Skip to content

OWD project: update existing events #61

@foolip

Description

@foolip

The way that events are documented on MDN and represented in BCD is not great, with different facets of events being treated as separate, and no clear entry point to learn about an event. Previous discussion on this is in mdn/browser-compat-data#7545 and mdn/browser-compat-data#12290.

To summarize the three main facets in terms of BCD entries / MDN pages that often co-exist:

  • Event interfaces, such as ClipboardEvent
  • *_event entries/pages such as cut_event (in this case there are three more pages)
  • on* event handler attributes, such as oncut (these are often on many interfaces, often via the GlobalEventHandlers mixins)

Suggested work:

  • Avoiding the duplication between *_event and on* entries and pages, and have a clear main page for each event such as "cut". While element.addEventListener('cut', handler) and element.oncut = handler aren't exactly the same and can have different browser support, I think we should think of this as one feature, which could have partial support.
  • Get rid of the last mixins: GlobalEventHandlers and WindowEventHandlers (Reorganize GlobalEventHandlers and WindowEventHandlers mixin data mdn/browser-compat-data#12290)
  • Ensure the correct linkage between events and their interface, so that one can always find the right interface for an event ("cut" → ClipboardEvent and ClipboardEvent → "cut" + "copy" + "paste")

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