isElement

Type: Function

Checks whether the given node is an element, optionally with the given name

Refer to domInfo for more information on how to import and use this function.

Arguments

  1. node

    (Required)

    Type: FontoNode | Node | NULL

    The node to test. Null is accepted and will always return false.

  2. name

    (Optional)

    Type: String

    Optional nodeName. If specified, the function will only return true if node.nodeName is equal to name.

Returns

Type: Boolean

Whether the node matches