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

Demix click events from GlobalEventHandlers #16529

Merged
merged 14 commits into from
Jul 12, 2022

Conversation

queengooborg
Copy link
Collaborator

This PR demixes the click events on the GlobalEventHandlers mixin.

@github-actions github-actions bot added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Jun 3, 2022
@foolip
Copy link
Collaborator

foolip commented Jun 10, 2022

The target of these events will always be an Element of some sort, according to https://w3c.github.io/uievents/#topmost-event-target. I've also confirmed this with https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=10374 in Chrome, Firefox and Safari – I can't get the event to fire at Document or Window.

So I think we should have these entries either on Element or on HTMLElement + SVGElement + MathMLElement, and think that it should probably be Element. I'll try to test if the event can be fired on an element not in a known namespace.

@foolip
Copy link
Collaborator

foolip commented Jun 10, 2022

I've confirmed with https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=10375 in Chrome, Firefox and Safari that a plain Element instance can be the target of "click" elements, so I think we should put these events on Element only.

@@ -597,6 +597,56 @@
}
}
},
"auxclick_event": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move these entries to Element.json and remove the other additions in this PR?

@foolip
Copy link
Collaborator

foolip commented Jun 10, 2022

Also, can you link to both https://w3c.github.io/uievents/#click and https://html.spec.whatwg.org/multipage/webappapis.html#handler-onclick in the resulting entries here?

@queengooborg queengooborg added the needs content update 📝 This PR needs a corresponding update to mdn/content to update the documentation label Jun 13, 2022
@github-actions
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

1 similar comment
@github-actions
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@foolip
Copy link
Collaborator

foolip commented Jun 21, 2022

@queengooborg can you review the Element vs. HTMLElement + SVGElement question?

@github-actions
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link

github-actions bot commented Jul 9, 2022

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@queengooborg queengooborg removed the needs content update 📝 This PR needs a corresponding update to mdn/content to update the documentation label Jul 12, 2022
@queengooborg queengooborg merged commit 0ca2eb2 into mdn:main Jul 12, 2022
@queengooborg queengooborg deleted the api/GlobalEventHandlers/click branch July 12, 2022 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants