3 <script src=
"../../resources/js-test.js"></script>
7 var targetDetails
= document
.getElementById("targetDetails");
8 var clonedDetails
= targetDetails
.cloneNode(true);
9 document
.body
.appendChild(clonedDetails
);
10 var targetSummary
= document
.getElementById("targetSummary");
11 var clonedSummary
= targetSummary
.cloneNode(true);
12 targetDetails
.appendChild(clonedSummary
);
14 if (!window
.internals
)
17 // On cloned <details>, marker shadow element should be created
18 var targetDetailsSummaryShadow
= internals
.shadowRoot(targetDetails
.querySelector("summary"));
19 targetMarkerPseudoId
= internals
.shadowPseudoId(targetDetailsSummaryShadow
.firstChild
);
20 var clonedDetailsSummaryShadow
= internals
.shadowRoot(clonedDetails
.querySelector("summary"));
21 clonedMarkerPseudoId
= internals
.shadowPseudoId(clonedDetailsSummaryShadow
.firstChild
);
22 shouldBe("targetMarkerPseudoId", "clonedMarkerPseudoId");
25 <body onload=
"runTest()">
26 <p id=
"description">Test to clone details and summary elements
</p>
27 <div id=
"console"></div>
28 <details id=
"targetDetails" open
>
29 <summary id=
"targetSummary"></summary>