https://crates.io CSP style-src = ‘https://crates.io https://www.google.com https://ajax.googleapis.com’
Execution code in content script:
var style1 = document.createElement('style');
style1.innerHTML = 'body {font-size: 2em;}';
document.head.append(style1)
The style1
element can be parsed normally
Execution code in content script:
var style = document.createElement('style');
style.appendChild(document.createTextNode('* { color: red; }'));
document.head.appendChild(style);
this style
element blocked by CSP;
why?
thanks.
Demo Extension: http://xianqiao.wang/test/csp-css-test-1.0.zip