Lines Matching refs:template
2 <template> element contents do not participate in DOM
12 <template>a<div>foo</div>b</template>
17 $template = $dom->body->firstElementChild;
21 echo "First child of template: ";
22 var_dump($template->firstChild?->nodeName);
23 $template->append($dom->createElement('invisible'));
25 echo "First child of template after appending: ";
26 var_dump($template->firstChild->nodeName);
27 $template->innerHTML = $template->innerHTML;
29 var_dump($template->innerHTML);
31 var_dump($template->querySelector('div'));
39 echo "=== HTML serialization of <template> ===\n";
40 echo $dom->saveHTML($template), "\n";
43 echo "=== XML serialization of <template> ===\n";
44 echo $dom->saveXML($template), "\n";
47 $template->remove();
48 unset($template);
50 echo "=== Creating a new template should not leak the old contents ===\n";
51 $template = $dom->createElement('template');
52 var_dump($template->innerHTML);
57 First child of template: NULL
58 First child of template after appending: string(9) "INVISIBLE"
68 <template>a<div>foo</div>b</template>
71 === HTML serialization of <template> ===
72 <template>a<div>foo</div>b</template>
77 <template>a<div>foo</div>b</template>
80 === XML serialization of <template> ===
81 <template xmlns="http://www.w3.org/1999/xhtml">a<div>foo</div>b</template>
82 === Creating a new template should not leak the old contents ===