summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/svg/scripted/script-invalid-script-type.html
blob: 9602dd525bd4d2b77b8d4ffadebef9e568a98c77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!doctype html>
<link rel="author" href="mailto:avandolder@mozilla.com" title="Adam Vandolder">
<link rel="author" href="https://mozilla.org" title="Mozilla">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1827512">
<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>