Skip to content

3.1.2 gives client error on ESM but not when loading from CDN #3828

Answered by Leitet
Leitet asked this question in Q&A
Discussion options

You must be logged in to vote

Changing from 'window' to 'this' (this is undefined) is probably what introduced the error:

})(this, function() {

Loading a script using ESM will not set "this" to "window". This is undefined in a ESM-module. Loading the script using "script-tags" will set this to window though.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@Leitet
Comment options

@darrachequesne
Comment options

@darrachequesne
Comment options

Answer selected by darrachequesne
Comment options

You must be logged in to vote
1 reply
@Leitet
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants