Re: DOM Events

* Jean-Yves Bitterlich wrote:
>Method: EventTarget.dispatchEvent(Event evt)
>It is unclear how to notify an application about incorrect event target,
>when correct event is being dispatched to incorrect eventTarget by
>EventTarget.dispatchEvent(Event evt).

Thank you for your comments. The DOM Event Model does not have a notion
of correct event types for an event target, and there is consequently no
way to inform applications of semantic errors it might have made. It is
in fact difficult to see how such a notion might be defined. For example
the DOMAttrModified event is currently defined only for Element nodes in
the DOM Event Flow, but future specifications might re-use it to inform
applications of changes of pseudo-attributes on processing instructions
like xml-stylesheet. Applications might then use dispatchEvent to simu-
late this in legacy implementations.

>Method: initMutationEvent(NS)(...)
>Few parameters have "This value may be null". Parameter "relatedNode"
>not although it is possible that this arg is null...

Thanks for spotting this error, the next draft will note that this para-
meter may indeed be null, perhaps indirectly, saying that the parameters
to an init method may be null iff the attribute may be null. There may
be similar errors in the draft, please let us know if you find more.

>Method: canDispatch()
>The documentation of canDispatch says: "Tests if the implementation can
>generate events of a specified type." while the return value description
>is: "true if the implementation can generate and dispatch this event type,
>false otherwise" Note there is "and dispatch" part of the assertion. If
>we remove this part, then there will be no reason for confusion with an
>application events. Now it sounds like the implementation cannot dispatch
>application specific events.

I think simply removing the offending phrase is not the best course of
action, at least not until the draft defines what it means if an imple-
mentation is able to generate an event type. I will try to come up with
better text for this.

Thanks again for your comments. Please let us know if you have further
input on the document.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Thursday, 29 March 2007 11:12:47 UTC