youtube / spfjs

A lightweight JS framework for fast navigation and page updates from YouTube
https://youtube.github.io/spfjs/
MIT License
2.23k stars 147 forks source link

Link attribute "media" is not respected? #456

Open artemvd opened 4 years ago

artemvd commented 4 years ago

I'm not sure if it is not respected, maybe I am doing something wrong, but in HTML source I have something like this:

<link rel="stylesheet" media="print" href="styles.css" />

After SPF updates the page with dynamic navigation this link element has no media attribute and print styles are loaded and changing the page view completely.

Is there any way to preserve the media attribute? Or please point me to documentation how it should be done better.

Thank you in advance.