-
Notifications
You must be signed in to change notification settings - Fork 20.6k
Migrate from document.defaultView => window. Fixes #10373 #524
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
Conversation
link to ticket where i brought this up: http://bugs.jquery.com/ticket/10373 |
You're aliasing doing this you'd save another 4 (OMG FOUR!) bytes |
|
@jdalton, how's so? Are you making jQuery |
@jdalton, just curious... what difference does it make if we're using the |
I share the same concern as @jdalton. |
@jdalton thanks for the heads up, ping me on IRC :) |
@davidmurdoch @mikesherov One of the cool things about being document agnostic is that you can have jQuery in one (i)frame/primary document and script elements in other (i)frames w/o also having jQuery loaded in all (i)frames. I'm not sure how much compat jQuery has for this, but I thought it was a rad enough feature to add to my own lib. So basically before: // elem is from another iframe so its document, window, & defaultView are different
elem.ownerDocument.defaultView Using the primary window's method kills that functionality. |
This test confirms that it is iframe safe: http://jsfiddle.net/rwaldron/4NWcY/ |
@jdalton - Little bit of research here - |
It doesn't get the same result in FF 3.6; see this test. |
Thanks @jdalton ... I just confirmed that FF3.6 is indeed unable to get the computed style unless called from the correct context Perhaps when FF3.6 is EOL'ed, we can re-open this |
lame - but awesome - thanks for finding the hole @jdalton |
It doesn't work in Fennec either (produces the same result as FF 3.6) |
No description provided.