-
Beta Was this translation helpful? Give feedback.
Answered by
acywatson
Oct 18, 2022
Replies: 1 comment
-
Only ElementNodes can have children. ElementNode is a subclass of LexicalNode, like TextNode or DecoratorNode. If you have a LexicalNode, you might need to refine the type with something like |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
6peterlu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Only ElementNodes can have children. ElementNode is a subclass of LexicalNode, like TextNode or DecoratorNode. If you have a LexicalNode, you might need to refine the type with something like
if ($isElementNode(node)) {...}
and then access node.getChildren.