blob: 0ea79e2a9601d4a6c91a6658e8732580129b9fd8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<!DOCTYPE HTML>
<html>
<head>
<title>Bug 1299483 - CSP: Implement 'strict-dynamic'</title>
</head>
<body>
<div id="testdiv">blocked</div>
<script nonce="foo" src="http://mochi.test:8888/tests/dom/security/test/csp/file_strict_dynamic_default_src.js"></script>
<img id="testimage" src="http://mochi.test:8888/tests/image/test/mochitest/blue.png" data-result="blocked">
<script>
let img = document.getElementById("testimage");
img.addEventListener("load", function() {
img.dataset.result = "allowed";
}, { once: true });
</script>
</body>
</html>
|