ShadowRoot: getHTML() method - Web APIs | MDN
Syntax
Parameters
optionsOptional-
An options object with the following optional parameters:
serializableShadowRoots-
A boolean value that specifies whether to include serializable shadow roots. The default value is
false. shadowRoots-
An array of
ShadowRootobjects to serialize. These are included regardless of whether they are marked asserializable, or if they are open or closed. The default value is an empty array.
Return value
A string that represents the HTML serialization of the shadow root.
Exceptions
None.
Specifications
| Specification |
|---|
| HTML # dom-shadowroot-gethtml |