Re: Moving Form Events from DOM3 Events to HTML5 (was: Removing Form Events?)

On Mon, 21 Sep 2009, Doug Schepers wrote:
> Ian Hickson wrote (on 9/21/09 6:42 AM):
> > On Mon, 21 Sep 2009, Doug Schepers wrote:
> > > 
> > >  I'm pondering removing the event types associated with forms: 'change'
> > >  [1], 'submit' [2], and 'reset' [3].  They are so specific to HTML that
> > >  they are probably best defined there, rather than in a generic DOM Event
> > >  specification.
> > 
> > What does it mean to define an event? (i.e. what would I have to do in
> > HTML5 if we moved this there?)
> 
> You would need to specify the event type (e.g. 'submit'), which 
> interface(s) it uses, what values it populates the attributes of that 
> interface with and where they are derived from, whether it bubbles, what 
> the event target is, whether or not it is cancelable, what its default 
> action is (if that is to be defined in the spec, and is not 
> UA-dependent), and what extra context information it has beyond simply 
> the event target.
>
> You also need to specify the conditions under which it is dispatched... 
> say, user submits a form, or more precisely, user activates a <input> 
> element which is of types 'submit' or 'image' on a form.  You might also 
> discuss the conditions under which an event does not fire, or when it 
> exhibits idiosyncratic behavior (like 'load'), because of legacy quirks.

In that case HTML5 already defines 'submit', 'DOMActivate', 'load', 
'DOMContentLoaded', 'error', 'change', 'input', 'unload', 'focus' (just 
for elements, not windows), and 'blur' (again just for elements, not 
windows), as well as many other events that DOM3 Events doesn't currently 
mention.

It doesn't currently define 'reset' or 'abort'. I'd be happy to define 
those in HTML5; their absence is an oversight.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 21 September 2009 22:03:59 UTC