summaryrefslogtreecommitdiffstats
path: root/dom/security/test/csp/file_strict_dynamic_non_parser_inserted_inline.html
blob: 10a0f32e4ba941bf53fa8183dbeb28fb6d3965e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE HTML>
<html>
<head>
  <title>Bug 1299483 - CSP: Implement 'strict-dynamic'</title>
</head>
<body>
<div id="testdiv">blocked</div>

<script nonce="foo">
  var dynamicScript = document.createElement('script');
  dynamicScript.textContent = 'document.getElementById("testdiv").textContent="allowed"';
  document.head.appendChild(dynamicScript);
</script>

</body>
</html>