generated from oddbird/polyfill-template
-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The issue:
- The browser will not load stylesheets from links with the
disabledattribute. The polyfill currently will load such links, and if any changes are applied, replace them with new links withoutdisabledEven if the polyfill is modified to preserve(fixed in Do not fetch disabled links, but copy over all attributes to new link. #262)disabled, it might not be desirable to fetch the resource in the first place.- The same might be said for links with a
mediaattribute when the media query is not currently satisfied.
My rough idea to address the issue is basically this:
- For any stylesheet link that the polyfill would process:
- Check if it is
disabled. If so, add aMutationObserverwith{ attributeFilter: ['disabled'] }that will handle processing the stylesheet if it were to become no longer disabled. - Check if it has
media, and if so, create aMediaQueryList. If the media query list does not match, add an event listener for itschangeevent that will handle processing the stylesheet if it were to become applicable according the media query.
- Check if it is
jgerigmeyer
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request