Creates a custom element.
For more details, see "About Custom Elements" below.
Parameters:
value
The value to be assign to the element.The element value can be accessed later via
GOMElement.value
property.If this parameter is not specified, by default, the custom element has
null
value.
attr
Specify the attribute to be added to the created custom element.The passed
GOMAttribute
object is used only as a provider of the name and value of the new attribute (viaattr.name
andattr.value
properties).That object can be obtained from another element using
getAttr()
function or created withAttr()
function.
attributes
Specify multiple attributes to be added to the created custom element.The passed array should contain
GOMAttribute
objects that are used as providers of names and values of new attributes (viaGOMAttribute.name
andGOMAttribute.value
properties).
GOMAttribute
objects can be obtained from other elements usinggetAttr()
function or created withAttr()
function. The array can be created usingArray()
function.Any non-
GOMAttribute
objects contained in the passed array will be ignored.Note: If neither
attr
norattributes
parameter is specified (or it isnull
), the custom element will be created without attributes. The attributes can be added later usingsetAttr()
function.
Returns:
The GOMElement
object representing the created
custom element. (See below for more details.)
${include ../../../refs/custom_elements.htm}