W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2011

[whatwg] Why are media event handlers defined on HTMLElement instead of HTMLMediaElement

From: Philip Jägenstedt <philipj@opera.com>
Date: Tue, 15 Feb 2011 21:44:14 +0100
Message-ID: <op.vqyo7wmasr6mfa@nog>
On Tue, 15 Feb 2011 19:13:26 +0100, David Flanagan  
<david at davidflanagan.com> wrote:

> On 02/15/2011 02:17 AM, Philip J?genstedt wrote:
>> On Mon, 14 Feb 2011 22:54:54 +0100, David Flanagan
>> <david at davidflanagan.com> wrote:
>>> The draft specification defines 20+ medial event handler IDL
>>> attributes on HTMLElement. These events are non-bubbling and are
>>> always targeted at <audio> and <video> tags, so I wonder if they
>>> wouldn't be better defined on HTMLMediaElement instead.
>> All event handler attributes are defined on HTMLElement regardless of
>> which kind of element they are fired on, because it's simpler to
>> implement this way, and is already implemented this way.
> Fair enough, though I do think it will confuse developers who will think  
> that those media events bubble.  (I'll be documenting them as properties  
> of HTMLMediaElement).

It might be confusing if you document it as something other than what's  
actually the case, too...

> What about Document and Window?  What's the justification for defining  
> the media event handler attributes on those objects?

Huh, it is on Window, I hadn't seen that before. They were added in  
http://html5.org/r/3005 but I can't say I understand why.

I can't see it on Document in Web DOM Core, though, am I missing something?

Philip J?genstedt
Core Developer
Opera Software
Received on Tuesday, 15 February 2011 12:44:14 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:30 UTC