Element: 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
serializableshadow roots. The default value isfalse. 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 element.
Exceptions
None.
Specifications
| Specification |
|---|
| HTML # dom-element-gethtml |