summaryrefslogtreecommitdiffstats
path: root/parser/htmlparser/tests/mochitest/test_bug1646140-1.html
blob: 5dfe7cd8e86d457332023cb805e91623919afa5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<meta charset="utf-8">
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<div id="div">
<script>
/* globals div svgRanScript */
SimpleTest.waitForExplicitFinish();

window.svgRanScript = false;
const o = new MutationObserver(() => {
  o.disconnect();
  setTimeout(() => {
    ok(!svgRanScript, "svg onload must not fire");
    SimpleTest.finish();
  });
});
o.observe(div, {childList: true});
const p = (new DOMParser()).parseFromString("<svg onload=\"window.svgRanScript=true\"></svg>", "text/html");
div.appendChild(p.body);
</script>