API / geotoolkit / report / 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.
↳
Node↳↳
Element
Constructors
Accessors
Methods
Accessors
• get attributes(): NamedItemMap
Node attributes
Name
module:geotoolkit/report/dom/Node~Node#attributes
• get childNodes(): NodeList<Node>
The element holding the item.
Name
module:geotoolkit/report/dom/Node~Node#childNodes
• get data(): string
Node data
Name
module:geotoolkit/report/dom/Node~Node#data
string
• set data(data): void
Node data
Name
module:geotoolkit/report/dom/Node~Node#data
| Name | Type |
|---|---|
data | string |
void
• get firstChild(): Node
First child node
Name
module:geotoolkit/report/dom/Node~Node#firstChild
• get lastChild(): Node
Last child node
Name
module:geotoolkit/report/dom/Node~Node#lastChild
• get localName(): string
Node local name
Name
module:geotoolkit/report/dom/Node~Node#localName
string
• get nextSibling(): Node
Next sibling node
Name
module:geotoolkit/report/dom/Node~Node#nextSibling
• get nodeName(): string
Node name
Name
module:geotoolkit/report/dom/Node~Node#nodeName
string
• get nodeType(): NodeType
Node type
Name
module:geotoolkit/report/dom/Node~Node#nodeType
• get nodeValue(): string
Node value
Name
module:geotoolkit/report/dom/Node~Node#nodeValue
string
• set nodeValue(value): void
Node value
Name
module:geotoolkit/report/dom/Node~Node#nodeValue
| Name | Type |
|---|---|
value | string |
void
• get ownerDocument(): Document
Node owner document
Name
module:geotoolkit/report/dom/Node~Node#ownerDocument
• get parentNode(): Node
Parent node
Name
module:geotoolkit/report/dom/Node~Node#parentNode
• get previousSibling(): Node
Previous sibling node
Name
module:geotoolkit/report/dom/Node~Node#previousSibling
• get rootNode(): Node
Return root node
Deprecated
since 2022 (3.4) use Node#getRootNode instead
Name
module:geotoolkit/report/dom/Node~Node#rootNode
• get tagName(): string
Node tag name
Name
module:geotoolkit/report/dom/Node~Node#tagName
string
Methods
▸ appendChild(newChild): Node
Add child to the node
| Name | Type | Description |
|---|---|---|
newChild | Node | child to add |
▸ clearAttributes(): Node
Clear attributes
▸ clearNodes(): Node
Remove all child nodes from this node
this
▸ dispose(): void
Dispose.
void
▸ enumerateNodes(callback, target?): void
Enumerate children nodes
| Name | Type | Description |
|---|---|---|
callback | Callback<Node> | callback |
Optional target | QueryBuilder<any> | target |
void
INodeEnumerable.enumerateNodes
▸ Protected flush(serializationContext?): Node
Flush all changes before saving
| Name | Type | Description |
|---|---|---|
Optional serializationContext | SerializationContext | serialization Context |
▸ getAttribute(name): string
Return attribute value
| Name | Type | Description |
|---|---|---|
name | string | attribute name |
string
▸ getClassName(): string
string
▸ getCssClass(): string
Returns css class name to be used to apply CSS style
string
the css class name
▸ getElementRegistry(): IElementsRegistry
Returns elements Registry
▸ getGuid(): string
Returns element GUID
string
▸ getId(): string
Returns element id
string
▸ getNodeIndex(): number
Return node index
number
▸ getNodeValue(): string
Returns node value
string
▸ getParent(): Node
Returns parent node
parent
▸ getRootNode(): Node
Return root node
node
▸ getTagName(): string
Returns node tag name
string
▸ getTimeStamp(): number
Gets time stamp
number
timeStamp
▸ hasAttribute(name): boolean
Check if attribute exists
| Name | Type | Description |
|---|---|---|
name | string | attribute name |
boolean
▸ hasChildNodes(): boolean
Return true if node has children
boolean
▸ hasEventListener(type, callback?): boolean
Check if a list of event listeners for this type contains this listener
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
Optional callback | Function | to be called, if null, check if any callback is registered |
boolean
EventDispatcher.hasEventListener
▸ indexOfNode(node): number
Returns index of node.
| Name | Type | Description |
|---|---|---|
node | Node | item to get index of |
number
▸ insertAfter(newChild, refChild): Node
Insert child
▸ insertBefore(newChild, refChild): Node
Insert child
▸ Protected invalidate(): Node
this
▸ Protected invalidateDocument(eventArgs): Node
Invalidate root document
| Name | Type | Description |
|---|---|---|
eventArgs | NodeEventArgs | event args |
this
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ lock(): Node
Lock node
▸ 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.
this
▸ notify(type, source, args?): Node
Notify listeners
| Name | Type | Description |
|---|---|---|
type | string | event types |
source | any | of the event |
Optional args | any | arguments of the event |
this
▸ 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.
| Name | Type | Description |
|---|---|---|
Optional type | string | type of the event |
Optional callback | EventListener | function to be called |
this
▸ off<E>(type, callback): Node
| Name | Type |
|---|---|
E | extends string |
▸ on(type, callback, options?): Node
Attach listener on event that will be called whenever the specified event is delivered to the target
If the callback function is already in the list of event listeners for this target, the function is not added a second time.
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.
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
callback | EventListener | to be called |
Optional options | Options | options of subscription |
this
▸ on<E>(type, callback, options?): Node
| Name | Type |
|---|---|
E | extends string |
| Name | Type |
|---|---|
type | E |
callback | (eventType: E, sender: Node, args: EventMap[E]) => void |
Optional options | Options |
▸ Protected onParentChanged(): Node
this
▸ removeChild(child): Node
Remove child from node
| Name | Type | Description |
|---|---|---|
child | Node | to remove |
▸ replaceChild(newChild, oldChild): Node
Replace child
▸ save(recursive?, serializationContext?): string
Serialize element to xml
| Name | Type | Description |
|---|---|---|
Optional recursive | boolean | save whole dom element structure |
Optional serializationContext | SerializationContext | serialization Context |
string
▸ setAttribute(name, value): Node
Set attribute value
| Name | Type | Description |
|---|---|---|
name | string | attribute name |
value | string | attribute value |
▸ setAttributeNode(newAttr): Node
Adds a new Attribute node to the specified element.
| Name | Type | Description |
|---|---|---|
newAttr | Attribute | attribute |
this
▸ setCssClass(cssClass): Node
Set css class
| Name | Type | Description |
|---|---|---|
cssClass | string | css class |
▸ Protected setElementRegistry(registry): Node
Set shadow element registry
| Name | Type | Description |
|---|---|---|
registry | IElementsRegistry | elements registry |
▸ setGuid(guid): Node
Set node GUID
| Name | Type | Description |
|---|---|---|
guid | string | node GUID |
▸ setNodeValue(nodeValue): Node
Set node value
| Name | Type | Description |
|---|---|---|
nodeValue | string | node value |
▸ setSilent(bool): Node
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ unlock(): Node
Unlock node
▸ updateTimeStamp(): Node
Update time stamp to indicate that style has been changed.
this
▸ Static findParentNode<T>(node, classType): InstanceType<T>
Find root of the node with specified type
| Name | Type |
|---|---|
T | extends Constructable<any> |
| Name | Type | Description |
|---|---|---|
node | Node | node to start search |
classType | T | type of the class to search for or short interface name |
InstanceType<T>
▸ Static findParentNode(node, classType): Node
Find root of the node with specified type
| Name | Type | Description |
|---|---|---|
node | Node | node to start search |
classType | string | interface name to search for |
▸ Static getClassName(): string
string