Class: SelectiveSerializer

html2wt/SelectiveSerializer~SelectiveSerializer(options)

new SelectiveSerializer(options)

If we have the page source (this.env.page.src), we use the selective serialization method, only reporting the serialized wikitext for parts of the page that changed.

If we have the page source (this.env.page.src), we use the selective serialization method, only reporting the serialized wikitext for parts of the page that changed. Else, we fall back to serializing the whole DOM.

Parameters:
Name Type Description
options Object

Options for the serializer.

Properties
Name Type Attributes Description
env MWParserEnvironment
wts WikitextSerializer <optional>
Source:

Methods

serializeDOM(body) → {Promise}

Selectively serialize an HTML DOM document.

Selectively serialize an HTML DOM document.

WARNING: You probably want to use FromHTML.serializeDOM instead.

Parameters:
Name Type Description
body Node
Source:
Returns:
Type
Promise