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

Node

Direct Subclass:

Comment, Doctype, ParentNode, Text

A Node is an interface from which a number of DOM types inherit, and allows these various types to be treated (or tested) similarly.

See:

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get
public set

nodeValue(value: *): *

public get

Returns the Document that this node belongs to.

public get

Method Summary

Public Methods
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

Public Members

public get nodeValue: string | null: * source

Properties:

NameTypeAttributeDescription
Node#nodeValue *

Return:

string | null

Return Properties:

NameTypeAttributeDescription
Node#nodeValue *

public set nodeValue(value: *): * source

public get ownerDocument: Document source

Returns the Document that this node belongs to. If no document is associated with it, returns null.

public get textContent: string source

Public Methods

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

Params:

NameTypeAttributeDescription
eventType string
listener function
capturingPhase boolean

Return:

*

public dispatchEvent(event: Event): boolean source

Params:

NameTypeAttributeDescription
event Event

Return:

boolean

public getAttribute(attributeName: string): string source

get attribute's value

Params:

NameTypeAttributeDescription
attributeName string

Return:

string

public hasAttribute(attributeName: string): boolean source

checks if attribute exists for node

Params:

NameTypeAttributeDescription
attributeName string

Return:

boolean

public removeAttribute(attributeName: string) source

remove attribute

Params:

NameTypeAttributeDescription
attributeName string

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

Params:

NameTypeAttributeDescription
eventType string
listener function
capturingPhase boolean

Return:

boolean

public setAttribute(attributeName: string, attributeValue: string) source

set attribute's value

Params:

NameTypeAttributeDescription
attributeName string
attributeValue string