utils/dom/getcommonancestor
@ckeditor/ckeditor5-utils/src/dom/getcommonancestor
module
Filtering
Functions
-
getCommonAncestor( nodeA, nodeB ) → Node | DocumentFragment | Document | null
Searches and returns the lowest common ancestor of two given nodes.
Parameters
nodeA : Node
First node.
nodeB : Node
Second node.
Returns
Node | DocumentFragment | Document | null
Lowest common ancestor of both nodes or
null
if nodes do not have a common ancestor.
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.