Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fold DocumentAndElementEventHandlers into GlobalEventHandlers? #8053

Closed
foolip opened this issue Jun 29, 2022 · 2 comments · Fixed by #8096
Closed

Fold DocumentAndElementEventHandlers into GlobalEventHandlers? #8053

foolip opened this issue Jun 29, 2022 · 2 comments · Fixed by #8096

Comments

@foolip
Copy link
Member

foolip commented Jun 29, 2022

#699 introduced this Web IDL:

interface mixin DocumentAndElementEventHandlers {
  attribute EventHandler oncopy;
  attribute EventHandler oncut;
  attribute EventHandler onpaste;
};

Per https://w3c.github.io/clipboard-apis/#fire-a-clipboard-event these events fire on elements and bubble. https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=10421 confirms the bubbling.

In other words, these events are much like "click" or "mousemove" events.

What's weird is that the the oncopy event handler properties are on only HTMLElement and Document, even though they bubble and will reach the window object.

Should we just move these event handler attributes to GlobalEventHandlers?

@foolip

This comment was marked as outdated.

@zcorpan
Copy link
Member

zcorpan commented Jul 1, 2022

I think that would make sense. @hallvors do you know if there was any web compat rationale here? Or just what IE did or so?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants