1
0
Fork 0
firefox/testing/web-platform/tests/html/syntax/serializing-html-fragments/serializing-cdata-in-html-document.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

12 lines
593 B
HTML

<!DOCTYPE html>
<title>Serializing CDATA in an HTML document</title>
<link rel="help" href="https://html.spec.whatwg.org/multipage/parsing.html#serialising-html-fragments">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(t => {
const doc = new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg"><![CDATA[<img>]]></svg>', 'application/xml');
const el = document.adoptNode(doc.documentElement);
assert_equals(el.outerHTML, '<svg xmlns="http://www.w3.org/2000/svg">&lt;img&gt;</svg>');
});
</script>