utils/dom/getcommonancestor
module
Functions
-
getCommonAncestor( nodeA, nodeB ) → null | Node
module:utils/dom/getcommonancestor~getCommonAncestor
Searches and returns the lowest common ancestor of two given nodes.
Parameters
nodeA : Node
First node.
nodeB : Node
Second node.
Returns
null | Node
Lowest common ancestor of both nodes or
null
if nodes do not have a common ancestor.