ShadowRoot: getHTML() method - Web APIs | MDN

Syntax

Parameters

options Optional

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 ShadowRoot objects to serialize. These are included regardless of whether they are marked as serializable, 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

Browser compatibility

See Also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.