Add ElementInternals polyfill
alexgagnon opened this issue · comments
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
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.
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.
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