W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2004

[whatwg] This step must be skipped if the form has no onreceived attribute

From: Jim Ley <jim.ley@gmail.com>
Date: Wed, 16 Jun 2004 18:08:23 +0100
Message-ID: <851c8d310406161008683cdb9e@mail.gmail.com>
On Wed, 16 Jun 2004 16:56:21 +0000 (UTC), Ian Hickson <ian at hixie.ch> wrote:
> On Sun, 13 Jun 2004, Jim Ley wrote:
> > I was going to stop the comments for now, but:
> >
> > | Step seven: Dispatch the received event.
> > | This step must be skipped if the form has no onreceived attribute.
> >
> > Was so awful I had to mention it...  We can't use DOM events to add event
> > listeners, why not, it's utterly ridiculous...
> 
> You can add event listeners -- you just have to make sure the attribute is
> present as well. This is required because otherwise in order to implement
> this, every time you submitted a form you would have to wait til you had
> completely parsed the new document before tearing down the old one, which
> is of course unacceptable. This way, the author has to give a clear sign
> (adding an attribute) that this is acceptable for him.

Why is the clear sign of having a listener for the event not
sufficient?  What is the basic difference.

it seems rather ridiculous to go:

chicken.setAttributeNS(null,'onrecieved','wibble')
chicken.addEventListenerNS(somethingNS,'received',etc

especially as then upon re-serialisation of the document the
onrecieved attribute is likely in the wrong state.

I'd encourage you to reconsider this.

Jim.
Received on Wednesday, 16 June 2004 10:08:23 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:34 UTC