Skip to content

Should onselectstart and onselectionchange have content attributes or just IDL attributes? #351

@josepharhar

Description

@josepharhar

The spec currently lists IDL attributes for onselectstart and onselectionchange here: https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers

Someone found the onselectionchange content attribute is not currently interoperable between browsers. Consider the following:

<div id=parent onselectionchange="console.log('parent onselectionchange')">
  <input onselectionchange="console.log('input onselectionchange')">
</div>

Firefox and Safari will attach selectionchange event listeners for both elements, but chrome does neither. I'd be happy to implement this in chrome if the spec is updated to explicitly say that we should have global onselectionchange content attributes in addition to IDL attributes.

I suspect that onselectstart has the same interop issue right now.

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