is Element
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
node
(Required)
Type: Node | NULL
The node to test. Null is accepted and will always return false.
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