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 (via attr.name and attr.value properties).

That object can be obtained from another element using getAttr() function or created with Attr() 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 (via GOMAttribute.name and GOMAttribute.value properties).

GOMAttribute objects can be obtained from other elements using getAttr() function or created with Attr() function. The array can be created using Array() function.

Any non-GOMAttribute objects contained in the passed array will be ignored.

Note:  If neither attr nor attributes parameter is specified (or it is null), the custom element will be created without attributes. The attributes can be added later using setAttr() function.

Returns:

The GOMElement object representing the created custom element. (See below for more details.)

${include ../../../refs/custom_elements.htm}