Adding DOCUMENT_TYPE_NODE there would be wrong. You are allowed to select *around* a doctype, you're just not allowed to put a range endpoint *inside* the doctype.
Checking for a doctype up the parent chain is not needed since there is no way to give doctypes any children.
Adding DOCUMENT_TYPE_NODE there would be wrong. You are allowed to select *around* a doctype, you're just not allowed to put a range endpoint *inside* the doctype.
Checking for a doctype up the parent chain is not needed since there is no way to give doctypes any children.