findCommonAncestor

public function findCommonAncestor(a:Element, b:Element):Element
Find the common ancestor of two elements. This is a shorter method than using the DOM Range logic.

Params

Name Type Description
a Element Element to find common ancestor of.
b Element Element to find common ancestor of.

Returns

Element Common ancestor element of the two input elements.