Skip to main content
Modular Documentation
Guides
Reference
Reference
/
@modular/sdk/editor
$hasAncestor
function
Returns true if targetNode is an ancestor of child by walking up the parent chain.
function $hasAncestor(child: LexicalNode, targetNode: LexicalNode): boolean
Import
import { $hasAncestor } from '@modular/sdk/editor';