Skip to content

HrToken (EN)

bhsd edited this page Jul 4, 2024 · 6 revisions

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>');
Clone this wiki locally