My chrome extension needs to modify certain css rules on user's page. Accessing styles via document.styleSheets
only gives access to styles linked from within the same domain. Other elements of document.styleSheets
array have cssRules/rules
set to null.
Why is it cross domain policy applies here? Styles are being applied anyway regardless of their origin, so what is the point? And how to get around it in my case?
EDIT:
The reason I need to MODIFY user css rules (as opposed to simply adding my own) is that I need to protect custom element injected by extension from being affected by *
rules. see details in this question