Skip to content

Commit

Permalink
Test inserting two text nodes from a fragment into an empty script el…
Browse files Browse the repository at this point in the history
…ement
  • Loading branch information
nox committed Feb 11, 2019
1 parent 7796c84 commit 0f95919
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions dom/nodes/Node-appendChild-text-in-script.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<meta charset=utf-8>
<title>Node.appendChild: inserting two text nodes in an empty script</title>
<link rel=help href="https://dom.spec.whatwg.org/#dom-node-appendChild">
<link rel=help href="https://dom.spec.whatwg.org/#concept-node-insert">
<link rel=help href="https://github.com/whatwg/dom/issues/575">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<body></body>
<div id="log"></div>
<script id="script"></script>
<script>
var script = document.getElementById("script");
var scriptRan = false;

var df = document.createDocumentFragment();
df.appendChild(new Text(";"));
df.appendChild(new Text("scriptRan = true;"));

assert_false(scriptRan, "script ran");
script.appendChild(df);
assert_true(scriptRan, "script did not run completely");
done();
</script>

0 comments on commit 0f95919

Please sign in to comment.