본문 바로가기

Chrome dev tool - constructed stylesheet

 

 

 

bugs.chromium.org/p/chromium/issues/detail?id=946975

 

946975 - chromium - An open-source project to help move the web forward. - Monorail

 

bugs.chromium.org

UA - User Agent

DevTools: report constructed stylesheets as regular origin not UA

Constructed stylesheets (new CSSStyleSheet) have no associated node
or href, so they were appearing as 'user agent' styles in DevTools.

Since they are still user-authored styles, this CL gives them the
Regular origin.

 

 

chromedevtools.github.io/devtools-protocol/tot/CSS/

 

Chrome DevTools Protocol

Chrome DevTools Protocol - version tot - CSS domain

chromedevtools.github.io

isMutableboolean

Whether this stylesheet is mutable. Inline stylesheets become mutable after they have been modified via CSSOM API.

 element's stylesheets become mutable only if DevTools modifies them. Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.

isConstructedboolean

Whether this stylesheet is a constructed stylesheet (created using new CSSStyleSheet()).

 

 

 

stackoverflow.com/questions/64291368/why-the-chrome-browser-change-css-link-files-to-constructed-stylesheet-after-clo

 

Why The Chrome Browser change CSS Link Files To Constructed Stylesheet After Closing The Inspect Element And How To Fix That?

I'm experiencing this problem: In Google Chrome: Whenever I'm editing Css of My HTML page with Inspect Element, And then I'm closing the inspect element, then if I open that again, it shows this: ...

stackoverflow.com

Do you have in your html or in your css file something like: isConstructed or isMutable

Based on google dev tool doc it is happening because of those headers: https://chromedevtools.github.io/devtools-protocol/tot/CSS/

Try to remove them and you should not have that anymore

Based on this article, it might be the way you are calling css. If you call it like: const sheet = new CSSStyleSheet(); or const style = document.createElement('style');