- From: Simon Pieters <simonp@opera.com>
- Date: Fri, 10 Sep 2010 11:58:40 +0200
- To: "www-dom@w3.org" <www-dom@w3.org>
Here's a partial review of DOM 3 Events http://www.w3.org/TR/2010/WD-DOM-Level-3-Events-20100907/ What's the use case for extended feature strings for event types (hasFeature('Events.click', ''))? Opera, WebKit and Gecko don't support this. [1] What's the use case for feature strings for event interfaces (hasFeature('KeyboardEvent', '') or hasFeature('Events.KeyboardEvent'))? The spec says it's for backwards compatibility, but Opera, WebKit and Gecko don't support this. [2] It's easier to test for event interfaces by checking if the interface object exists as a property on the global object, i.e. window.KeyboardEvent. (Opera currently doesn't expose KeyboardEvent on window, but that's something we should fix.) [[ For example, the activation behavior of an HTML or SVG <a> element shall ... ]] [[ For example, if the Event.bubbles attribute is set to false, the bubble phase shall be skipped, and if Event.stopPropagation() has been called prior to the dispatch, all phases must be skipped. ]] RFC2119 keywords in examples is bad style. Please replace RFC2119 keywords in non-normative sections and examples with other words. There are three sections (1.2, 1.3 and 6.2.6) that are marked as normative, and they all use different style. All sections that are normative should be marked as such, or all sections that are non-normative should be marked as such, or both. [[ The defaultView is an object which implements the AbstractView interface of the Document's DocumentView interface, which serves as a reference to the containing frame or window. ]] I think the idea is to drop support for DOM Views. HTML5 has added defaultView on the Window interface. [3] [[ Note: for legacy reasons, the load event does not propagate to the defaultView in HTML implementations. ]] It's *fired* on the defaultView in HTML implementations, as specified in HTML5. I think this specification should use WebIDL for the IDL fragments. [[ To create an instance of the Event interface, use the DocumentEvent.createEvent("Event") method call. ]] I'd like a response to http://lists.w3.org/Archives/Public/www-dom/2009OctDec/0138.html Gecko has a property called isTrusted that does the same as trusted, and seems to be used in the wild. [4][5] Please rename trusted to isTrusted. Looking at [6], I notice that Opera and WebKit have cancelBubble and srcElement. WebKit and Gecko have more constants on Event. The definition of preventDefault does not talk about default actions that happen before the event propagation (like 'change' on checkboxes). [1] http://software.hixie.ch/utilities/js/live-dom-viewer/saved/606 [2] http://software.hixie.ch/utilities/js/live-dom-viewer/saved/607 [3] http://html5.org/tools/web-apps-tracker?from=4947&to=4948 [4] http://software.hixie.ch/utilities/js/live-dom-viewer/saved/610 [5] http://www.google.com/codesearch?q=event%5C.isTrusted+lang%3Ajs [6] http://software.hixie.ch/utilities/js/live-dom-viewer/saved/611 -- Simon Pieters Opera Software
Received on Friday, 10 September 2010 09:59:16 UTC