The spec may say one thing, but implementations may do another.
I see that both of my mentioned examples work correctly (addEventListener
works as well as on(x)).
I guess it was an implementation issue that has been resolved since then.
If someone knowledgeable knows for sure that there are (currently) no
interfaces that support the on(x) but no the addEventListener method, then,
great.
However, the opposite does exist (for example, DOMContentLoaded versus no
on(x) property). So we would need this distinction anyway.
☆*PhistucK*
On Tue, Nov 20, 2012 at 4:57 PM, Tobie Langel <tobie@fb.com> wrote:
> On 11/20/12 3:48 PM, "Chris Mills" <cmills@w3.org> wrote:
>
> >> Again, I am not sure, but I think WebSocket and Notification might not
> >>have a standard event mechanism (addEventListener), but only on(x)
> >>properties.
>
> That's in correct, both inherit from EventTarget[1].
>
> --tobie
>
> ---
> [1]: http://dom.spec.whatwg.org/#eventtarget
>
>