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

Expose functions to force the polyfill and make not exception with WC polyfill #124

Merged
merged 2 commits into from
Dec 21, 2023

Conversation

e111077
Copy link
Contributor

@e111077 e111077 commented Dec 20, 2023

We expose the forceCustomStateSetPolyfill() and forceElementInternalsPolyfill() functions as well as make the polyfill not exception when the Custom Elements and or the Shady DOM Polyfill is also applied. NOTE: with these polyfills, the EI polyfill will not work as intended, but it enables custom elements using ElementInternals from exceptioning in these cases.

The main use case for this is for consuming WCs that use ElementInternals Chrome extensions. Content Scripts in Chrome extensions (until we have scoped custom elements) require you use the CE polyfill. WCs that have ElementInternals will exception because they are being applied to non-custom elements. This polyfill will not help because it does feature detection and chrome has EI. Therefore we need EI polyfill to be forced.

Copy link
Owner

@calebdwilliams calebdwilliams left a comment

Choose a reason for hiding this comment

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

Thanks for sending this over @e111077! lgtm

@calebdwilliams calebdwilliams merged commit 41441a4 into calebdwilliams:main Dec 21, 2023
1 check passed
@calebdwilliams
Copy link
Owner

This has been released as [email protected]

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

Successfully merging this pull request may close these issues.

2 participants