- From: Ian Hickson <ian@hixie.ch>
- Date: Tue, 2 Dec 2008 20:51:58 +0000 (UTC)
- To: Simon Pieters <simonp@opera.com>, Eric Carlson <eric.carlson@apple.com>
- Cc: public-html <public-html@w3.org>
On Tue, 2 Dec 2008, Simon Pieters wrote: > > The spec doesn't have any event handler attributes for them, but has for > seemingly all other events. Firefox seems to support at least <video > onloadstart>. Catching the 'loadstart' event is not possible without a > content event handler attribute if you have <video src> in the markup. > XHR has DOM event handler attributes for progress events. So it seems a > bit weird that <video> doesn't have them. Is it intentional? The intent is that all events defined in HTML5 have corresponding event attributes (on all elements and Window), I just haven't gone through and actually defined them all yet. > Another thing is that there are quite many events. The use cases for all > events aren't clear to us. Maybe some of them could be grouped together > into a single readystatechange event? Maybe also networkstatechange? > Maybe some could be dropped? Why is having a lot of events a problem? On Tue, 2 Dec 2008, Eric Carlson wrote: > > I agree that there are a lot of events, and actually we have also been > talking about coalescing all of the ready state and network state events > into readystatechange and networkstatechange. One potential problem with > this is that a script could miss state transitions because the > readyState or networkState attributes may have changed between the time > an event is posted and when the script's listener is triggered. I > haven't thought this through enough to know if it will be a serious > problem or not. Experience with onreadystatechange with XMLHttpRequest also suggests that it is a bad authoring experience, as people just end up doing: o.onreadystatechange = function(e) { if (o.readyState == x) { ... } } ...for the case "x" that they want. Having individual events just seems saner given this idiom. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 2 December 2008 20:52:35 UTC