Spin.js errors out on firefox 7.0.x , it error out on line 64 saying Security error '}', 0);
NB: I am trying to use spin.js within an iframe
Can you send me a link to an example?
Is the content of your iframe loaded from the same domain as spin.js?
Hey I am sorry but I don't have a public link yet, but I can tell you that the iframe url is www.Adomain.com,
but all the markup, scripts and stylesheets within the iFrame load from www.Bdomain.com.
Also this works great on chrome and ie7+
Just wanted to give you an update that It hasn't been working on any firefox, Till now I was just trying on 7.0.x but I just tried on other Firefox versions and haven been getting the same security error on Line 64 of spin.js
I'm also having the same issue.
I think this is happening on Line 58 for me -- with respect to "sheet.insertRule"
It looks like a Cross-Domain issue. In my specific case, my JS/CSS are hosted on CDN (different domain).
Hm, I wonder if inserting <style type="text/css">/* CSS rules here */</style> would make any difference.
<style type="text/css">/* CSS rules here */</style>
Hi everyone! Could you please try this again with the current HEAD? It contains a fix for issue #39 which is probably related to this error.
I noticed that in FF documents.styleSheets[documents.styleSheets.length-1] always is the Firebug CSS (if installed), which might also explain the security error. If that's the case, the patch for issue #39 should fix this, too.
While it fixes the error in Firefox, this creates a new issue in Safari.
. line: 61
. message: "'undefined' is not an object (evaluating 'sheet.insertRule')"
. sourceId: 4743268672
Unfortunately I still can't reproduce this issue. Viewing example.html (from the master branch) works in Safari (5.1.1) even if I load spin.js from another domain (raw.github.com vs. localhost) or include an external stylesheet. @phishbot Any chance you could post a link to a non-working example?
One more idea how this can be fixed — 974cdd3#commitcomment-681824
Possible fix for issue #36
I pushed another version to the master branch which uses the sheet or styleSheet property of the inserted style element. Still needs some more cross-browser testing. Let me know whether this works for you.
This is still an issue for me in Firefox 7.0; it works fine in Firefox 3.6 , Chrome, and Safari.
You can see it broken here:
One note : it works if you have Firebug up, but is broken without it.
here is another test link which is more accurate
woops! it looks like it did fix all our issues with it. Thanks eych!
Merge branch 'master' into gh-pages
Defaults are now exposed as Spinner.defaults
Added float:left for #preview
Possible fix for issue #36
Wrapped the code into a function expression to keep the local scope tidy
fix for issue #39