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

Add missing api.ShadowRoot.slotchange_event feature #17674

Conversation

queengooborg
Copy link
Contributor

This PR is a part of a project to add missing interfaces and interface features to BCD that are from an active spec (including WICG specs) and is supported in at least one browser. This particular PR adds the missing slotchange_event member of the ShadowRoot API, populating the results using data from the mdn-bcd-collector project (v6.1.2).

Tests Used: https://mdn-bcd-collector.appspot.com/tests/api/ShadowRoot/slotchange_event

Safari Source Commit: WebKit/WebKit@3e059ee

Check out the collector's guide on how to review this PR.

This PR is a part of a project to add missing interfaces and interface features to BCD that are from an active spec (including WICG specs) and is supported in at least one browser.  This particular PR adds the missing `slotchange_event` member of the ShadowRoot API, populating the results using data from the [mdn-bcd-collector](https://mdn-bcd-collector.appspot.com) project (v6.1.2).

Tests Used: https://mdn-bcd-collector.appspot.com/tests/api/ShadowRoot/slotchange_event

Safari Source Commit: WebKit/WebKit@3e059ee

_Check out the [collector's guide on how to review this PR](https://github.com/foolip/mdn-bcd-collector#reviewing-bcd-changes)._
@queengooborg queengooborg added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Sep 4, 2022
@foolip
Copy link
Contributor

foolip commented Sep 4, 2022

This was removed in #16733 and shouldn't be added back.

@queengooborg
Copy link
Contributor Author

Hmm...what about the event handler? The event handler is present on this interface in the IDL from Webref.

@foolip
Copy link
Contributor

foolip commented Sep 4, 2022

It's the same situation as keydown and many other events on Document. The event can bubble through Document and there are handler properties on Document, but it's really just one event/feature.

We could consider the presence of the properties on Serial when deciding the support of the events on SerialPort, if they didn't match.

I don't think the guidelines cover this stuff very well.

@Elchi3
Copy link
Member

Elchi3 commented Sep 16, 2022

The compat table on MDN is broken since we removed this event in #16733, see https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/onslotchange

I'm not really sure what our guidelines should be exactly. The Serial and SerialPort case was discussed in #13925.

@foolip
Copy link
Contributor

foolip commented Sep 19, 2022

OK, so it looks like there were content changes still needed for #16733 when it was merged. I think that https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/onslotchange should redirect to https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/slotchange_event.

@foolip
Copy link
Contributor

foolip commented Sep 19, 2022

In this case it could also make sense to document the event as bubbling up to ShadowRoot, like this:
https://developer.mozilla.org/en-US/docs/Web/API/Serial#events

@Elchi3
Copy link
Member

Elchi3 commented Sep 19, 2022

I believe this PR should be closed then.
I proposed the content changes in mdn/content#20895

@foolip
Copy link
Contributor

foolip commented Sep 19, 2022

Sweet, thanks @Elchi3!

@Elchi3 Elchi3 closed this Sep 19, 2022
@queengooborg queengooborg deleted the api/ShadowRoot/slotchange_event/additions branch September 19, 2022 21:58
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.

3 participants