Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /dom/nodes/Node-cloneNode-parser-created-names.html - WPT Dashboard Interop Dashboard
<!doctype html>
<meta charset="utf-8">
<title>Node.cloneNode: parser-created elements with unusual names</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="colon">KSL.com <http://KSL.com> has not verified the accuracy of the information provided with</div>
<div id="angle"><p>Blah blah blah<p><Home-Schooling</b><p><p>In talking with parents who home-school</div>
<script>
"use strict";
test(() => {
const container = document.getElementById("colon");
const clone = container.cloneNode(true);
assert_equals(clone.outerHTML, container.outerHTML);
}, "cloneNode on elements with names containing colons");
test(() => {
// "<Home-Schooling</b>" parses to include a <home-schooling<> element
const container = document.getElementById("angle");
const clone = container.cloneNode(true);
assert_equals(clone.outerHTML, container.outerHTML);
}, "cloneNode on elements with names containing angle brackets");
</script>