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 ElementInternals polyfill #1251

Open
alexgagnon opened this issue Oct 11, 2022 · 3 comments
Open

Add ElementInternals polyfill #1251

alexgagnon opened this issue Oct 11, 2022 · 3 comments
Labels
library Relates to an Origami library service Relates to an Origami service

Comments

@alexgagnon
Copy link

Feature

What

I'd like to request the ElementInternals polyfill (https://www.npmjs.com/package/element-internals-polyfill) be added to polyfill.io

Details

ElementInternals allows for attaching inputs in the shadow DOM to forms. Currently all browsers except for Safari support it: https://caniuse.com/?search=elementinternals

@github-actions github-actions bot added the service Relates to an Origami service label Oct 11, 2022
@JakeChampion JakeChampion transferred this issue from polyfillpolyfill/polyfill-service Jan 9, 2023
@github-actions github-actions bot added the library Relates to an Origami library label Jan 9, 2023
@kapouer
Copy link
Contributor

kapouer commented Mar 10, 2023

That would be awesome.
Upstream repo is actively maintained: https://github.com/calebdwilliams/element-internals-polyfill

This is a missing piece for modern form elements.

@mhassan1
Copy link
Collaborator

One issue with that polyfill is that it uses ES6 syntax (e.g. const, =>). @JakeChampion Do we ever transpile polyfills that come from modules? I don't see an example of that.

@JakeChampion
Copy link
Owner

One issue with that polyfill is that it uses ES6 syntax (e.g. const, =>). @JakeChampion Do we ever transpile polyfills that come from modules? I don't see an example of that.

We don't but we can do so using the postinstall script for the polyfill -- https://github.com/Financial-Times/polyfill-library/blob/8a3121f80abbdabc2259315f9973348559da7663/polyfills/Intl/PluralRules/config.toml#LL36C1-L36C12

I prefer authoring directly in ES3/5 for polyfills because transpilers sometimes bring in way too much extra code

@robertboulton robertboulton removed this from Backlog in Origami ✨ Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
library Relates to an Origami library service Relates to an Origami service
Projects
None yet
Development

No branches or pull requests

4 participants