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

Document global beforexrselect event #15376

Closed
wants to merge 1 commit into from

Conversation

Elchi3
Copy link
Member

@Elchi3 Elchi3 commented Apr 26, 2022

This is a PR to discuss how to document events that are defined as GlobalEventHandlers.

Spec: https://immersive-web.github.io/dom-overlays/#onbeforexrselect

WebIDL:

partial interface mixin GlobalEventHandlers {
  attribute EventHandler onbeforexrselect;
};

Document includes GlobalEventHandlers
Window includes GlobalEventHandlers
HTMLElement includes GlobalEventHandlers
MathMLElement includes GlobalEventHandlers
SVGElement includes GlobalEventHandlers

If we would avoid the GlobalEventHandlers mixin, then the specific interfaces for the beforexrselect event would be Document, Window, HTMLElement, MathMLElement, SVGElement. I think it makes no sense to create pages under all these interfaces. So, here I'm instead creating a single page beforexrselect_event under GlobalEventHandlers along with a section on the page called "Event availability". The title of the page is just 'beforexrselect event' without an interface.

In BCD, the data would live in api.GlobalEventHandlers.beforexrselect_event. See mdn/browser-compat-data#16026

@Elchi3 Elchi3 requested a review from a team as a code owner April 26, 2022 09:47
@Elchi3 Elchi3 requested review from sideshowbarker and removed request for a team April 26, 2022 09:47
@github-actions github-actions bot added the Content:WebAPI Web API docs label Apr 26, 2022
@Elchi3 Elchi3 marked this pull request as draft April 26, 2022 09:48
@github-actions
Copy link
Contributor

Preview URLs

Flaws

Note! 4 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/GlobalEventHandlers/beforexrselect_event
Title: beforexrselect event
on GitHub
Flaw count: 1

  • bad_bcd_queries:
    • No BCD data for query: api.GlobalEventHandlers.beforexrselect_event

External URLs

URL: /en-US/docs/Web/API/GlobalEventHandlers/beforexrselect_event
Title: beforexrselect event
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/XRSession/domOverlayState
Title: XRSession.domOverlayState
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/XRSession/selectend_event
Title: XRSession: selectend event
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/XRSession/select_event
Title: XRSession: select event
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/XRSession/selectstart_event
Title: XRSession: selectstart event
on GitHub

No new external URLs

@saschanaz

This comment was marked as outdated.

@Elchi3
Copy link
Member Author

Elchi3 commented Apr 26, 2022

So this wants to move XRSession.onbeforexrselect to GlobalEventHandlers?

I don't see XRSession.onbeforexrselect anywhere. Can you elaborate? I think it has always been on GlobalEventHandlers.

@saschanaz
Copy link
Contributor

I don't see XRSession.onbeforexrselect anywhere. Can you elaborate? I think it has always been on GlobalEventHandlers.

Oh, I misunderstood then. Sorry.

@foolip
Copy link
Contributor

foolip commented May 4, 2022

The target of this event is an Element and it bubbles, so I think we should have this event under Element and perhaps redirect for Document and Window.

@Elchi3
Copy link
Member Author

Elchi3 commented Aug 16, 2022

The target of this event is an Element and it bubbles, so I think we should have this event under Element and perhaps redirect for Document and Window.

I believe this is what I should do now given GEH pages are gone.

@Elchi3
Copy link
Member Author

Elchi3 commented Aug 18, 2022

Closing this in favor of #19698 where I document this event under Element per @foolip's suggestion.

@Elchi3 Elchi3 closed this Aug 18, 2022
@Elchi3 Elchi3 deleted the globalevent-beforexrselect branch August 18, 2022 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants