We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
var global = typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); module.exports = global; if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
In $.global.js, self is used as global. But on IE 8 if you changed document.domain, the elder self will be refused to access.
$.global.js
self
global
document.domain
// i.e. var global = require('./$.global'); document.domain = 'foo.bar' // no log on IE 8 global.console.log('Accessible!')
What's worse is that the loader will cache $.global module, so if you changed domain after the first time you load it, it won't work any longer.
$.global
The text was updated successfully, but these errors were encountered:
You can propose more correct way global detection?
Sorry, something went wrong.
window
Maybe you could detect if the script is executing in a web worker, and use window if not.
2f62d27
No branches or pull requests
In
$.global.js
,self
is used asglobal
. But on IE 8 if you changeddocument.domain
, the elderself
will be refused to access.What's worse is that the loader will cache
$.global
module, so if you changed domain after the first time you load it, it won't work any longer.The text was updated successfully, but these errors were encountered: