Creates a custom element.

For more details, see About Custom Elements below.

Parameters:

elementTypeName

Specify the element type to be associated with the custom element.

That may be either '#CUSTOM' element type or any other element types extending it.

The definition of such special custom element types may be supported by the particular DSM Type Driver (e.g. via a special XML schema or JSON file).
When this parameter is omitted or null, the '#CUSTOM' element type is assumed.
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 be created with a function-call-like construct looking as

GOMAttribute[] (
  ...
)
where inside the round brackets is the list of GOMAttribute objects separated with commas. The GOMAttribute objects provide names and values of new attributes (via GOMAttribute.name and GOMAttribute.value properties). They can be obtained from other elements using getAttr() function or created with Attr() function.

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.

children
Specify the enumeration of other custom elements to be added as children of the new custom element.

Any other objects (e.g. non-custom elements) will be ignored.

When this parameter is omitted or null, the new custom element will have no children.

Returns:
The GOMElement object representing the created custom element.
${include ../../../refs/custom_elements.htm}