Skip to content

Clarify guidance for onfoo attributes #611

@cbiesinger

Description

@cbiesinger

https://w3ctag.github.io/design-principles/#always-add-event-handlers says to add an onfoo attribute to the event handler of the element.

I am interpreting it such that if I have an HTMLFooElement that has an onfoo handler, I should add onfoo to interface HTMLFooElement.

However, WICG/fenced-frame#144 (comment) seems to say that such event handlers should instead be added to the global event handler list (interface mixin GlobalEventHandlers, at least in blink).

I am not sure if I am misreading the guidance and/or the discussion thread but it would be great to clarify what is the right thing to do here.

cc'ing some people from an internal discussion and from that thread:
@domfarolino @domenic @dbaron

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions