HrToken (EN) - bhsd-harry/wikiparser-node GitHub Wiki
Other Languages
Introduction
Horizontal Rule.
All of the following properties and methods are not available in the Mini and Browser versions.
Methods
cloneNode
returns: this
Deep clone the node.
// cloneNode (main)
var {firstChild} = Parser.parse('----');
assert.equal(firstChild, '----');
assert.deepStrictEqual(firstChild.cloneNode(), firstChild);
toHtml
version added: 1.10.0
returns: string
Convert to HTML.
// toHtml (main)
var {firstChild} = Parser.parse('----');
assert.strictEqual(firstChild.toHtml(), '<hr>');