Prefixing pitfall: "var foo = window.foo || window.mozFoo || window.oFoo || window.msFoo || window.webkitFoo" only works if foo is prefixed.
-
-
Replying to @really_bz
@bz_moz can you explain how that is a pitfall? If window.foo is truthy the expression returns. Assuming it’s the right thing is a pitfall1 reply 0 retweets 0 likes -
Replying to @really_bz
@bz_moz@rwaldron So the hazard is only if the global is on the window prototype. I thought most globals aren't.1 reply 0 retweets 0 likes -
Replying to @littlecalculist
@littlecalculist@rwaldron The hazard is if the global has Window.prototype on its proto chain. As in, "every single web page".1 reply 0 retweets 0 likes -
Replying to @really_bz
@bz_moz@rwaldron I mean if the global *variable* is an own property then it's not a hazard, & I thought that was true of most std gvars.1 reply 0 retweets 0 likes -
Replying to @littlecalculist
@littlecalculist@rwaldron Properties defined in WebIDL live on the proto, always.1 reply 0 retweets 0 likes -
Replying to @really_bz
@bz_moz@rwaldron Wait, is this *changing*?! That would break like the entire web... Maybe we should get specific (& take this off Twitter).2 replies 0 retweets 0 likes
@littlecalculist @rwaldron It's been this way forever in Gecko, Presto, Trident, afaict. Chrome and Safari do something different.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.