DoubleUnderscoreToken (EN) - bhsd-harry/wikiparser-node GitHub Wiki

Other Languages

Introduction

Behavior switch.

All of the following properties and methods are not available in the Mini and Browser versions.

Properties

name

type: string
Lowercase name of the behavior switch, read-only.

// name (main)
var {firstChild} = Parser.parse('__NOTOC__');
assert.equal(firstChild, '__NOTOC__');
assert.strictEqual(firstChild.name, 'notoc');

Methods

cloneNode

returns: this
Deep clone the node.

// cloneNode (main)
var {firstChild} = Parser.parse('__NOTOC__');
assert.equal(firstChild, '__NOTOC__');
assert.deepStrictEqual(firstChild.cloneNode(), firstChild);