A collection of useful static methods to deal with JavaScript DOM.
- Since:
- 4.0.0
Methods
(static) addElement(parentID, elementTag, elementIDopt, elementContentopt)
Adds a DOM Node element to the HTML DOM.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
parentID |
String | ID of the parent node under which the element is to be added. |
||
elementTag |
String | Tag of the DOM Node element to be added. |
||
elementID |
String |
<optional> |
ID of the DOM Node element to be added. By default, |
|
elementContent |
String |
<optional> |
null | Content of the DOM Node element. |
- Since:
- 4.0.0
- See:
Throws:
-
-
for empty arguments
- Type
- TypeError
-
-
-
for missing DOM elements and/or tags
- Type
- ReferenceError
-
(static) deleteElement(elementID)
Deletes a DOM Node element from the HTML DOM.
Parameters:
Name | Type | Description |
---|---|---|
elementID |
String | ID of the DOM Node element to be deleted. |
- Since:
- 4.0.0
- See:
Throws:
-
-
for empty arguments
- Type
- TypeError
-
-
-
for missing DOM elements and/or tags
- Type
- ReferenceError
-