CSP: script-src

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since August 2016.

* Some parts of this feature may have varying levels of support.

HTTP Content-Security-Policy (CSP) script-src 는 JavaScript에 대한 검증된 출처를 지정합니다. 여기에는

인라인 스크립트도 실행되지 않습니다:

html

addEventListener를 호출하는 것으로 대체해야 합니다.:

js
document.getElementById("btn").addEventListener("click", doSomething);