This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
From: Anne van Kesteren [mailto:annevk@opera.com] >> It [DOM3 Events] also describes basic concepts such as default actions and their >> effect on cancelable events, trusted events, etc., for which having a >> central reference is quite informative. Except the way it talks about default actions has been quite confusing, making people think it was somehow more tied to the event than it actually was. ------------------------- Review that section; see if any confusing portions can be cleaned up.
I made a sweep through this section and did indeed end-up re-writing it extensively. I believe what I've written qualifies as reducing the confusion and divorcing the concept of the default action from the event objects as much as is fair to do so. Anne, give it a read and let me know how it can be futher polished, or if you are satisfied with it. http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.216#event-flow-default-cancel
It still talks about as if they are somehow associated with the event object. While the code for implementing this goes like: function run() { if(obj.dispatchEvent(ev)) { defaultAction() } } I.e. defaultAction is associated with run, not ev.
(In reply to comment #2) > It still talks about as if they are somehow associated with the event object. > While the code for implementing this goes like: > > function run() { > if(obj.dispatchEvent(ev)) { > defaultAction() > } > } That is not what implementations do.
That is the logic if you look at it from JavaScript.
(In reply to comment #2) > It still talks about as if they are somehow associated with the event object. > While the code for implementing this goes like: > > function run() { > if(obj.dispatchEvent(ev)) { > defaultAction() > } > } > > I.e. defaultAction is associated with run, not ev. Hmm. So, "defaultAction()" is something I can easily describe. Similarly, "dispatchEvent(ev)" is something else I can describe. Both of these are related since the result of one (ev) is fed into the course of action for defaultAction(). "run" is not so easy to describe :-) While I agree with you from a browser-maker, technical point of view, as an introduction to the concept of default actions (which the section is supposed to be), I think it's OK to have the two related to some degree. Since you re-opened the bug, would you mind providing some replacement text for parts of that section that could be improved? My goal is not require defining "run", unless you can manage it succinctly.
http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#introduction-to-dom-events has introductory text on the matter. Ideally we align the text between Level 3 and 4. I basically started from scratch to get a fresh perspective on things.
(In reply to comment #6) > http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#introduction-to-dom-events > has introductory text on the matter. Ideally we align the text between Level 3 > and 4. I basically started from scratch to get a fresh perspective on things. After reading your "fresh perspective", I took another stab at this: http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-flow-default-cancel Should harmonize slightly better with DOM4 prose.