utils/dom/getcommonancestor
module
Functions
getCommonAncestor( nodeA, nodeB ) → Node | nullmodule:utils/dom/getcommonancestor~getCommonAncestorSearches and returns the lowest common ancestor of two given nodes.
Parameters
nodeA : NodeFirst node.
nodeB : NodeSecond node.
Returns
Node | nullLowest common ancestor of both nodes or
nullif nodes do not have a common ancestor.