Finds the exact Element Type associated with the given element.

When the element complies with several Element Types having inheritance relationship (if supported by the underlying DSM Type), this function finds the best matching Element Type (i.e. the lowest heir).

Parameters:

element

Specifies the element whose type should be resolved. If absent, the generator context element will be assumed (same as the call contextElement.resolveElementType(..))

elementTypeNames

If presents, specifies the list of the Element Type names (separated with ';') which should be tested first.

This may speed up the search of the appropriate Element Type. For instance, if the provided name is of a top-level Element Type known to match this element, the search will start from this type and descend to its best matching heir.

Note: When the list contains names of non-existent Element Types, the generator will raise an error.

Returns:

An object representing the Element Type most closely matching the specified element.

See Also:

checkElementType(), instanceOf(), toElement(), findElementType(), GOMElement.elementType

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