Discover the best of the web!
Learn more about Digg by taking the tour.
Firechicken?
my.opera.com — Mozilla decided to tweak the specs to solve the problem their bugs created.
- 23 diggs
- digg it
- phjr, on 10/12/2007, -0/+3Let's not digg only good news.
- HeroreV, on 10/12/2007, -1/+0For JavaScript that is embedded in or referred to from (X)HTML pages, the "window" object refers to the global namespace. It isn't just a regular old object representing the window/tab. It isn't even a DOM node. It is entirely reasonable to assume that the specification doesn't cover the window object.
From the DOM Events spec: "Capture operates from the top of the tree, generally the Document".
The W3C is working on a "Window Object" specification. It will decide what is correct behavior, not some whiny part-time software tester with a blog. - xErath, on 10/12/2007, -0/+2"not some whiny part-time software tester with a blog."
Hallvord is an Opera employee. - hallvors, on 10/12/2007, -0/+2"whiny part-time software tester with a blog" - LOL. I've added that description to my profile on my.opera.com .
HeroreV: the inconsistency it causes to special-case "load" events is annoying and might be confusing. The "Window Object" spec explicitly says that the load event exception is due to bugs in earlier implementations, so it's not just me complaining about Firefox breaking things ;-) - HeroreV, on 10/12/2007, -0/+0> I've added that description to my profile
LOL, that's funny.
> the inconsistency ... is annoying and might be confusing.
That's true, but the window object is inconsistent in much bigger ways than that. It is _very_ special, and it's important to keep that in mind. I'd really prefer that event listeners weren't ever allowed to be attached to the window object to begin with.
> The "Window Object" spec explicitly says ...
That spec is still a working draft. (Although I couldn't find anything about event propagation in the currently online version anyway.) IMO it's entirely reasonable to put more importance on compatibility than a working draft.
There are some pretty serious bugs in Gecko (like 99820 and 235441), but this doesn't seem like an issue. - HeroreV, on 10/12/2007, -0/+0Oh yeah, duh. Here's where you can get the latest Window Object working draft:
http://dev.w3.org/cvsweb/2006/webapi/Window/publish/Window.html
For all zero people who wanted to know. - hallvors, on 10/12/2007, -0/+0(Re-posting snippet from my.opera.com comment that was a direct response to something said here)
"I'd really prefer that event listeners weren't ever allowed to be attached to the window object to begin with" - indeed. I seem to remember that we support this merely because it's What Gecko Does (tm). Load event listeners added to document never fire(d?) - before we ran into this problem Opera actually didn't implement window.addEventListener at all since, as we know, the window object isn't part of the DOM nor the DOM events spec...
Digg is coming to a city (and computer) near you! Check out all the details on our