Open
Description
Filing an issue to continue the discussion in #785 (comment). This spans many specs, but filing it in DOM since this is where events are defined.
Looking at there there are event handler attributes like onclick
on the platform today, one might infer the following principle at work: event handler attributes should be present on the interface(s) that an event can fire on, and any additional interfaces that the event can bubble through. Therefore, there are onclick
attributes on HTMLElement
, Document
and Window
.
I have a few questions around this:
- Should
ShadowRoot
have event handler attributes for all events that can bubble, likeonclick
? - Why does
GlobalEventHandlers
have attributes for events that don't bubble, like all of the media element events? - Why do we put event handler attributes on
HTMLElement
+SVGElement
+MathMLElement
even when the events can fire on and bubble through plainElement
instances?onclick
is an example of this.