You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure only components needing the dataset, closest and possibly trim polyfills import them. This'll help reduce bundle size for non-configurable or non-internationalisable components.
Possible approach could be to:
make a separate module for closestAttributeValue that imports Element.prototype.closest
make a separate module for normaliseString that imports String.prototype.trim
import Element.prototype.dataset in all components requiring configuration as they access the dataset. Given that one will be an easy one to miss, I wonder if we shouldn't have a getDataset function that has side effect.
These files could live in an src/polyfilled folder that we'll revisit for v5.
What
Ensure only components needing the
dataset
,closest
and possiblytrim
polyfills import them. This'll help reduce bundle size for non-configurable or non-internationalisable components.Possible approach could be to:
closestAttributeValue
that importsElement.prototype.closest
normaliseString
that importsString.prototype.trim
Element.prototype.dataset
in all components requiring configuration as they access thedataset
. Given that one will be an easy one to miss, I wonder if we shouldn't have agetDataset
function that has side effect.These files could live in an
src/polyfilled
folder that we'll revisit for v5.Why
@colinrotherham wrote a neat explanation in this comment: #2887 (comment)
Who needs to work on this
Developers
Who needs to review this
Developers
Done when
The text was updated successfully, but these errors were encountered: