mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 23:23:28 +00:00
dom: implement document.createDocumentFragment
This commit is contained in:
22
tests/wpt/dom/nodes/DocumentFragment-constructor.html
Normal file
22
tests/wpt/dom/nodes/DocumentFragment-constructor.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user