Skip to content
New issue

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

security error with firefox #59

Open
ccastello opened this issue Nov 23, 2016 · 0 comments
Open

security error with firefox #59

ccastello opened this issue Nov 23, 2016 · 0 comments

Comments

@ccastello
Copy link

Hello. On firefox 50, with this little page, i have, on console, the message "SecurityError: The operation is insecure." It appears only on firefox, with the an AMD process and the option "async". Like this :

<!DOCTYPE html> < html> < head> <title>test xstyle</title> </ head> < body> < p>Please wait...</p> < script type="text/javascript"> var dojoConfig = { async : true, deps: ['xstyle/main'] }; < /script> < script type="text/javascript" src="dojo/dojo.js"></script> < /body> < /html>

The solution is to modify the "main.js" :
line 31 var needsParsing = sheet.needsParsing, cssRules = sheet.rules || sheet.cssRules;

=>
var needsParsing = sheet.needsParsing, cssRules; try { cssRules = sheet.rules || sheet.cssRules; } catch(e) { if(e.name !== 'SecurityError') throw e; return; };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant