4 border:
1px solid black;
11 <script src=
"../resources/runner.js"></script>
14 window
.onload = function() {
15 var root
= document
.querySelector('#list').createShadowRoot();
16 root
.appendChild(document
.createElement('content'));
18 PerfTestRunner
.measureTime({
19 description
: "Measures performance of creating and rendering elements with shadow roots (contains class descendant selector styles).",
23 var frag
= document
.createDocumentFragment();
24 var tmpl
= document
.querySelector('#tmpl');
25 var start
= PerfTestRunner
.now();
28 frag
.appendChild(tmpl
.content
.cloneNode(true));;
29 } while (++i
< listSize
);
30 document
.querySelector('#list').appendChild(frag
);
32 PerfTestRunner
.forceLayoutOrFullFrame();
33 return PerfTestRunner
.now() - start
;
36 document
.querySelector('#list').innerHTML
= '';
43 <div class=
"bar baz">item
</div>
46 <section id=
"list"></section>