blob: f3ba3eaf6bf9f118c9eb64c3c930c9977165b76e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<!DOCTYPE html>
<html parseparts>
<title>DOM Parts: parseparts on root</title>
<meta name="author" href="mailto:masonf@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./resources/domparts-utils.js"></script>
<div>{{#}}Parts{{/}}</div>
<script>
test(() => {
const target = document.currentScript.previousElementSibling;
assert_true(document.documentElement.hasAttribute('parseparts'));
const root = document.getPartRoot();
assert_equals(root.getParts().length,0);
assert_equals(target.innerHTML,'{{#}}Parts{{/}}');
target.remove();
}, 'It is not possible to put parseparts on the root element');
</script>
|