Home Reference Source Repository
import ParentNode from 'html-document/src/ParentNode.js'
public class | source

ParentNode

Extends:

Node → ParentNode

The ParentNode interface contains methods that are particular to Node objects that can have children.

See:

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get

TODO return {HTMLCollection}

public get
public get
public get
public get
public get

Method Summary

Public Methods
public

appendChild(child: Node): Node

public

Clone a Node, and optionally, all of its contents.

public

Method returns true if node has child nodes.

public

insertBefore(child: Node, existingChild: Node): Node

public

removeChild(toRemoveChild: Node): Node

public

replaceChild(newChild: Node, oldChild: Node): Node

Protected Methods
protected

_createCollection(selector: *): *

Inner method to create new live HTMLCollection.

Inherited Summary

From class Node
public get
public set

nodeValue(value: *): *

public get

Returns the Document that this node belongs to.

public get
public

addEventListener(eventType: string, listener: function, capturingPhase: boolean): *

public
public

getAttribute(attributeName: string): string

get attribute's value

public

hasAttribute(attributeName: string): boolean

checks if attribute exists for node

public

removeAttribute(attributeName: string)

remove attribute

public

removeEventListener(eventType: string, listener: function, capturingPhase: boolean): boolean

public

setAttribute(attributeName: string, attributeValue: string)

set attribute's value

Public Constructors

public constructor source

Override:

Node#constructor

Public Members

public get childNodes: Node[] source

TODO return {HTMLCollection}

public get firstChild: Node | null source

public get lastChild: Node | null source

public get nextSibling: Node | null source

public get parentNode: Node | null source

public get previousSibling: Node | null source

Public Methods

public appendChild(child: Node): Node source

Params:

NameTypeAttributeDescription
child Node

Return:

Node

public cloneNode(deep: boolean): Node source

Clone a Node, and optionally, all of its contents. By default, it clones the content of the node.

Params:

NameTypeAttributeDescription
deep boolean

Return:

Node

public hasChildNodes(): boolean source

Method returns true if node has child nodes.

Return:

boolean

public insertBefore(child: Node, existingChild: Node): Node source

Params:

NameTypeAttributeDescription
child Node
existingChild Node

Return:

Node

public removeChild(toRemoveChild: Node): Node source

Params:

NameTypeAttributeDescription
toRemoveChild Node

Return:

Node

public replaceChild(newChild: Node, oldChild: Node): Node source

Params:

NameTypeAttributeDescription
newChild Node
oldChild Node

Return:

Node

Protected Methods

protected _createCollection(selector: *): * source

Inner method to create new live HTMLCollection.

Params:

NameTypeAttributeDescription
selector *

Return:

*