new YXmlElement()
Classes
Members
-
_prelimAttrs :Map.<string, any>|null
-
-
_prelimAttrs :Map.<string, any>
-
Methods
-
_copy() → {YXmlElement}
-
Creates an Item with the same effect as this Item (without position effect)
Returns:
YXmlElement -
_integrate(y, item)
-
Integrate this type into the Yjs instance.
- Save this struct in the os
- This type is sent to other client
- Observer functions are fired
Parameters:
Name Type Description yDoc The Yjs instance
itemItem -
_write(encoder)
-
Transform the properties of this type to binary and write it to an BinaryEncoder.
This is called when this Item is sent to a remote peer.
Parameters:
Name Type Description encoderAbstractUpdateEncoder The encoder to write data to.
-
clone() → {YXmlElement}
-
Returns:
YXmlElement -
getAttribute(attributeName) → {String}
-
Returns an attribute value that belongs to the attribute name.
Parameters:
Name Type Description attributeNameString The attribute name that identifies the queried value.
Returns:
String -The queried attribute value.
-
getAttributes(snapshotopt) → {Object.<string, any>}
-
Returns all attribute name/value pairs in a JSON Object.
Parameters:
Name Type Attributes Description snapshotSnapshot <optional>
Returns:
Object.<string, any> -A JSON Object that describes the attributes.
-
removeAttribute(attributeName)
-
Removes an attribute from this YXmlElement.
Parameters:
Name Type Description attributeNameString The attribute name that is to be removed.
-
setAttribute(attributeName, attributeValue)
-
Sets or updates an attribute.
Parameters:
Name Type Description attributeNameString The attribute name that is to be set.
attributeValueString The attribute value that is to be set.
-
toDOM(_documentopt, hooksopt, bindingopt) → {Node}
-
Creates a Dom Element that mirrors this YXmlElement.
Parameters:
Name Type Attributes Default Description _documentDocument <optional>
document The document object (you must define this when calling this method in nodejs)
hooksObject.<string, any> <optional>
{} Optional property to customize how hooks are presented in the DOM
bindingany <optional>
You should not set this property. This is used if DomBinding wants to create a association to the created DOM type.
-
toString() → {string}
-
Returns the XML serialization of this YXmlElement. The attributes are ordered by attribute-name, so you can easily use this method to compare YXmlElements
Returns:
string -The string representation of this type.