1
0
Fork 0
firefox/testing/web-platform/tests/dom/nodes/DocumentFragment-constructor.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

22 lines
726 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<title>DocumentFragment constructor</title>
<link rel="help" href="https://dom.spec.whatwg.org/#dom-documentfragment-documentfragment">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
"use strict";
test(() => {
const fragment = new DocumentFragment();
assert_equals(fragment.ownerDocument, document);
}, "Sets the owner document to the current global object associated document");
test(() => {
const fragment = new DocumentFragment();
const text = document.createTextNode("");
fragment.appendChild(text);
assert_equals(fragment.firstChild, text);
}, "Create a valid document DocumentFragment");
</script>