Skip to content
Last updated

API / geotoolkit / report / dom / Node / Node

Class: Node

dom.Node.Node

Node is an interface from which various types of DOM API objects inherit, allowing those types to be treated similarly; for example, inheriting the same set of methods, or being testable in the same way.<br>

Hierarchy

Implements

Table of contents

Constructors
  • [new Node(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.report.dom.node.node.md#new node(options))
Accessors
Methods

Contents

Constructors

new Node(options)

• new Node(options)

Parameters

Name Type
optionsOptions

Overrides

EventDispatcher.constructor

Accessors

attributes

• get attributes(): NamedItemMap

Node attributes

Name

module:geotoolkit/report/dom/Node~Node#attributes

Returns

NamedItemMap


childNodes

• get childNodes(): NodeList<Node&gt;

The element holding the item.

Name

module:geotoolkit/report/dom/Node~Node#childNodes

Returns

NodeList<Node&gt;


data

• get data(): string

Node data

Name

module:geotoolkit/report/dom/Node~Node#data

Returns

string

• set data(data): void

Node data

Name

module:geotoolkit/report/dom/Node~Node#data

Parameters

Name Type
datastring

Returns

void


firstChild

• get firstChild(): Node

First child node

Name

module:geotoolkit/report/dom/Node~Node#firstChild

Returns

Node


lastChild

• get lastChild(): Node

Last child node

Name

module:geotoolkit/report/dom/Node~Node#lastChild

Returns

Node


localName

• get localName(): string

Node local name

Name

module:geotoolkit/report/dom/Node~Node#localName

Returns

string


nextSibling

• get nextSibling(): Node

Next sibling node

Name

module:geotoolkit/report/dom/Node~Node#nextSibling

Returns

Node


nodeName

• get nodeName(): string

Node name

Name

module:geotoolkit/report/dom/Node~Node#nodeName

Returns

string


nodeType

• get nodeType(): NodeType

Node type

Name

module:geotoolkit/report/dom/Node~Node#nodeType

Returns

NodeType


nodeValue

• get nodeValue(): string

Node value

Name

module:geotoolkit/report/dom/Node~Node#nodeValue

Returns

string

• set nodeValue(value): void

Node value

Name

module:geotoolkit/report/dom/Node~Node#nodeValue

Parameters

Name Type
valuestring

Returns

void


ownerDocument

• get ownerDocument(): Document

Node owner document

Name

module:geotoolkit/report/dom/Node~Node#ownerDocument

Returns

Document


parentNode

• get parentNode(): Node

Parent node

Name

module:geotoolkit/report/dom/Node~Node#parentNode

Returns

Node


previousSibling

• get previousSibling(): Node

Previous sibling node

Name

module:geotoolkit/report/dom/Node~Node#previousSibling

Returns

Node


rootNode

• get rootNode(): Node

Return root node

Deprecated

since 2022 (3.4) use Node#getRootNode instead

Name

module:geotoolkit/report/dom/Node~Node#rootNode

Returns

Node


tagName

• get tagName(): string

Node tag name

Name

module:geotoolkit/report/dom/Node~Node#tagName

Returns

string

Methods

appendChild

▸ appendChild(newChild): Node

Add child to the node

Parameters

Name Type Description
newChildNodechild to add

Returns

Node


clearAttributes

▸ clearAttributes(): Node

Clear attributes

Returns

Node


clearNodes

▸ clearNodes(): Node

Remove all child nodes from this node

Returns

Node

this


dispose

▸ dispose(): void

Dispose.

Returns

void

Inherited from

EventDispatcher.dispose


enumerateNodes

▸ enumerateNodes(callback, target?): void

Enumerate children nodes

Parameters

Name Type Description
callbackCallback<Node&gt;callback
Optional targetQueryBuilder<any&gt;target

Returns

void

Implementation of

INodeEnumerable.enumerateNodes


flush

▸ Protected flush(serializationContext?): Node

Flush all changes before saving

Parameters

Name Type Description
Optional serializationContextSerializationContextserialization Context

Returns

Node


getAttribute

▸ getAttribute(name): string

Return attribute value

Parameters

Name Type Description
namestringattribute name

Returns

string


getClassName

▸ getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName


getCssClass

▸ getCssClass(): string

Returns css class name to be used to apply CSS style

Returns

string

the css class name


getElementRegistry

▸ getElementRegistry(): IElementsRegistry

Returns elements Registry

Returns

IElementsRegistry


getGuid

▸ getGuid(): string

Returns element GUID

Returns

string


getId

▸ getId(): string

Returns element id

Returns

string


getNodeIndex

▸ getNodeIndex(): number

Return node index

Returns

number


getNodeValue

▸ getNodeValue(): string

Returns node value

Returns

string


getParent

▸ getParent(): Node

Returns parent node

Returns

Node

parent


getRootNode

▸ getRootNode(): Node

Return root node

Returns

Node

node


getTagName

▸ getTagName(): string

Returns node tag name

Returns

string


getTimeStamp

▸ getTimeStamp(): number

Gets time stamp

Returns

number

timeStamp


hasAttribute

▸ hasAttribute(name): boolean

Check if attribute exists

Parameters

Name Type Description
namestringattribute name

Returns

boolean


hasChildNodes

▸ hasChildNodes(): boolean

Return true if node has children

Returns

boolean


hasEventListener

▸ hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

EventDispatcher.hasEventListener


indexOfNode

▸ indexOfNode(node): number

Returns index of node.

Parameters

Name Type Description
nodeNodeitem to get index of

Returns

number


insertAfter

▸ insertAfter(newChild, refChild): Node

Insert child

Parameters

Name Type Description
newChildNodechild to insert
refChildNoderef child

Returns

Node


insertBefore

▸ insertBefore(newChild, refChild): Node

Insert child

Parameters

Name Type Description
newChildNodechild to insert
refChildNoderef child

Returns

Node


invalidate

▸ Protected invalidate(): Node

Returns

Node

this


invalidateDocument

▸ Protected invalidateDocument(eventArgs): Node

Invalidate root document

Parameters

Name Type Description
eventArgsNodeEventArgsevent args

Returns

Node

this


isDisposed

▸ isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

EventDispatcher.isDisposed


isSilent

▸ isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

EventDispatcher.isSilent


lock

▸ lock(): Node

Lock node

Returns

Node


normalize

▸ normalize(): Node

Puts the specified node and all of its subtree into a "normalized" form. In a normalized sub-tree, no text nodes in the sub-tree are empty and there are no adjacent text nodes.<br>

Returns

Node

this


notify

▸ notify(type, source, args?): Node

Notify listeners

Parameters

Name Type Description
typestringevent types
sourceanyof the event
Optional argsanyarguments of the event

Returns

Node

this

Inherited from

EventDispatcher.notify


off

▸ off(type?, callback?): Node

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Parameters

Name Type Description
Optional typestringtype of the event
Optional callbackEventListenerfunction to be called

Returns

Node

this

Inherited from

EventDispatcher.off

▸ off<E&gt;(type, callback): Node

Type parameters

NameType
Eextends string

Parameters

Name Type
typeE
callback(eventType: E, sender: Node, args: EventMap[E]) => void

Returns

Node

Inherited from

EventDispatcher.off


on

▸ on(type, callback, options?): Node

Attach listener on event that will be called whenever the specified event is delivered to the target <p> If the callback function is already in the list of event listeners for this target, the function is not added a second time. </p> <p> If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target. </p>

Parameters

Name Type Description
typestringtype of event or property
callbackEventListenerto be called
Optional optionsOptionsoptions of subscription

Returns

Node

this

Inherited from

EventDispatcher.on

▸ on<E&gt;(type, callback, options?): Node

Type parameters

NameType
Eextends string

Parameters

Name Type
typeE
callback(eventType: E, sender: Node, args: EventMap[E]) => void
Optional optionsOptions

Returns

Node

Inherited from

EventDispatcher.on


onParentChanged

▸ Protected onParentChanged(): Node

Returns

Node

this


removeChild

▸ removeChild(child): Node

Remove child from node

Parameters

Name Type Description
childNodeto remove

Returns

Node


replaceChild

▸ replaceChild(newChild, oldChild): Node

Replace child

Parameters

Name Type Description
newChildNodechild to replace with
oldChildNodechild to replace

Returns

Node


save

▸ save(recursive?, serializationContext?): string

Serialize element to xml

Parameters

Name Type Description
Optional recursivebooleansave whole dom element structure
Optional serializationContextSerializationContextserialization Context

Returns

string


setAttribute

▸ setAttribute(name, value): Node

Set attribute value

Parameters

Name Type Description
namestringattribute name
valuestringattribute value

Returns

Node


setAttributeNode

▸ setAttributeNode(newAttr): Node

Adds a new Attribute node to the specified element.

Parameters

Name Type Description
newAttrAttributeattribute

Returns

Node

this


setCssClass

▸ setCssClass(cssClass): Node

Set css class

Parameters

Name Type Description
cssClassstringcss class

Returns

Node


setElementRegistry

▸ Protected setElementRegistry(registry): Node

Set shadow element registry

Parameters

Name Type Description
registryIElementsRegistryelements registry

Returns

Node


setGuid

▸ setGuid(guid): Node

Set node GUID

Parameters

Name Type Description
guidstringnode GUID

Returns

Node


setNodeValue

▸ setNodeValue(nodeValue): Node

Set node value

Parameters

Name Type Description
nodeValuestringnode value

Returns

Node


setSilent

▸ setSilent(bool): Node

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

Node

this

Inherited from

EventDispatcher.setSilent


unlock

▸ unlock(): Node

Unlock node

Returns

Node


updateTimeStamp

▸ updateTimeStamp(): Node

Update time stamp to indicate that style has been changed.

Returns

Node

this


findParentNode

▸ Static findParentNode<T&gt;(node, classType): InstanceType<T&gt;

Find root of the node with specified type

Type parameters

NameType
Textends Constructable<any&gt;

Parameters

Name Type Description
nodeNodenode to start search
classTypeTtype of the class to search for or short interface name

Returns

InstanceType<T&gt;

▸ Static findParentNode(node, classType): Node

Find root of the node with specified type

Parameters

Name Type Description
nodeNodenode to start search
classTypestringinterface name to search for

Returns

Node


getClassName

▸ Static getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName