dom-parts-parseparts-on-body.tentative.html (779B)
1 <!DOCTYPE html> 2 <html> 3 <title>DOM Parts: parseparts on body</title> 4 <link rel=author href="mailto:masonf@chromium.org"> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 <script src="./resources/domparts-utils.js"></script> 8 9 <body parseparts> 10 <div>{{#}}Parts{{/}}</div> 11 12 <script> 13 test(() => { 14 const target = document.currentScript.previousElementSibling; 15 assert_true(document.body.hasAttribute('parseparts')); 16 const root = document.getPartRoot(); 17 const expectedRootParts = [{type:'ChildNodePart',metadata:[]}]; 18 assertEqualParts(root.getParts(),expectedRootParts,0,'declarative syntax should be recognized'); 19 target.remove(); 20 }, 'It is possible to put parseparts on the body element'); 21 </script>