Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/scripted/script-invalid-script-type.html - WPT Dashboard Interop Dashboard
<!doctype html>
<link rel="author" href="mailto:avandolder@mozilla.com" title="Adam Vandolder">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="host"></div>
<svg><script type="text/plain">window.scriptRan = true;</script></svg>
<script>
let svgScript = document.querySelector("svg > script");
svgScript.type = "text/javascript";
svgScript.appendChild(document.createTextNode(""));
test(function() {
assert_true(window.scriptRan);
}, "svg:script runs after valid script type is set");
</script>