Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
HTMLTemplateElement
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5namespace Phpdftk\Html\Dom;
6
7/**
8 * The `<template>` element. Per WHATWG DOM, a template has a `content` IDL
9 * attribute pointing to a DocumentFragment that holds its parsed children;
10 * the children are NOT inserted into the template element itself.
11 *
12 * For Declarative Shadow DOM (`<template shadowrootmode>`), the parser
13 * attaches a shadow root to the *parent* element and sets this template's
14 * `content` to that shadow root, so inserted children flow into the shadow
15 * tree. The `isDeclarativeShadowRoot` flag tells the parser to remove the
16 * template element from the light DOM once its tag closes — the shadow root
17 * on the parent is the surviving artefact.
18 *
19 * Phase 1B.4 ships the structural integration. The full DSD encapsulation
20 * (slot distribution, shadow-scoped selectors, `:host`/`::slotted`/`::part`)
21 * lands when `phpdftk/css` arrives (Phase 1D).
22 */
23final class HTMLTemplateElement extends Element
24{
25    public ?DocumentFragment $content = null;
26    public bool $isDeclarativeShadowRoot = false;
27}