Fix Node.getAncestor (error)
Add Selection.isCaretOnNewLine helper method