YXmlElement
Extends:
An YXmlElement imitates the behavior of a {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}.
- An YXmlElement has attributes (key value pairs)
- An YXmlElement has childElements that must inherit from YXmlElement
Constructor Summary
| Public Constructor | ||
| public |
|
|
Member Summary
| Public Members | ||
| public |
nodeName: * |
|
Method Summary
| Public Methods | ||
| public |
getAttribute(attributeName: String): String Returns an attribute value that belongs to the attribute name. |
|
| public |
Returns all attribute name/value pairs in a JSON Object. |
|
| public |
removeAttribute(attributeName: String): * Removes an attribute from this YXmlElement. |
|
| public |
setAttribute(attributeName: String, attributeValue: String): * Sets or updates an attribute. |
|
| public |
toDom(_document: Document, hooks: Object<key:hookDefinition>, binding: DomBinding): Element Creates a Dom Element that mirrors this YXmlElement. |
|
| public |
Returns the string representation of this YXmlElement. |
|
Public Constructors
public constructor() source
Public Members
public nodeName: * source
Public Methods
public getAttribute(attributeName: String): String source
Returns an attribute value that belongs to the attribute name.
Params:
| Name | Type | Attribute | Description |
| attributeName | String | The attribute name that identifies the queried value. |
public removeAttribute(attributeName: String): * source
Removes an attribute from this YXmlElement.
Params:
| Name | Type | Attribute | Description |
| attributeName | String | The attribute name that is to be removed. |
Return:
| * |
public setAttribute(attributeName: String, attributeValue: String): * source
Sets or updates an attribute.
Return:
| * |
public toDom(_document: Document, hooks: Object<key:hookDefinition>, binding: DomBinding): Element source
Creates a Dom Element that mirrors this YXmlElement.
Params:
| Name | Type | Attribute | Description |
| _document | Document |
|
The document object (you must define this when calling this method in nodejs) |
| hooks | Object<key:hookDefinition> |
|
Optional property to customize how hooks are presented in the DOM |
| binding | DomBinding |
|
You should not set this property. This is used if DomBinding wants to create a association to the created DOM type. |
