-
Notifications
You must be signed in to change notification settings - Fork 237
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
Bug: VML: script injection causes IE to fail on if (!document.namespaces) #27
Comments
An even more serious problem is probably the use of document.write(). While it would be possible to make cufon.js work without it, I don't really see the point. One possible use case may be loading cufon only for browsers that do not support @font-face, but you'd almost certainly experience a delay if you loaded cufon.js that way. |
I've added the It has me stumped at the moment. ...Arrr! |
Update: It seems that three things are needed for sorry old MSIE 8 >:
Bottom-line: lazy-loading cufon seems impossible in MSIE 8 > |
This should be rechecked again since #232 introduced support for asynchronous (delayed) loading. |
I'm not sure that the commit #232 fixes the issue. In IE9, I get an "unspecified error" here: var ns = document.namespaces; (line 967 in current latest version) I assume this is a symptom of the same issue as above, but I could be missing something here as I'm no JS expert. I am using deferred loading on my site, basically using this guy's technique (his first example): http://stackoverflow.com/a/5853358 Let me know if you need more info to help debug this issue (or let me know if I'm missing something super obvious). Oh, oddly enough, refreshing the page makes the error magically no longer occur, and the font-replacement proceeds as usual. :P |
@amatecha I'd like to get to the bottom of this. Can you prepare a minimal test case, just one html file (and CSS/JS as needed) with everything in it and create a gist? You can use "Vegur" font and omit it from your file as it is part of this project already. |
If your page contains a few images that delay the
window.onload
event slightly, the following code will trigger the error:This seems to be a known bug, with a really ugly workaround (see:
http://groups.google.com/group/Google-Maps-API/browse_thread/thread/3c63eb14c45fad9c)
I wonder if one could avoid having the error occur at load time - by delaying the execution of the function checking the document.namespaces until the first time the user calls Cufon.replace...
...or doing try-catch with a
window.onload
fallback......just a thought.
The text was updated successfully, but these errors were encountered: