Better handling of stylesheet links that have disabled
and/or media
#246
Labels
enhancement
New feature or request
disabled
and/or media
#246
The issue:
disabled
attribute.The polyfill currently will load such links, and if any changes are applied, replace them with new links withoutdisabled
Even 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.media
attribute when the media query is not currently satisfied.My rough idea to address the issue is basically this:
disabled
. If so, add aMutationObserver
with{ attributeFilter: ['disabled'] }
that will handle processing the stylesheet if it were to become no longer disabled.media
, and if so, create aMediaQueryList
. If the media query list does not match, add an event listener for itschange
event that will handle processing the stylesheet if it were to become applicable according the media query.The text was updated successfully, but these errors were encountered: