pub fn compare_document_position(
doc: &BaseDocument,
node: NodeId,
other: NodeId,
) -> Result<u16>Expand description
node.compareDocumentPosition(other).
Deliberate difference: upstream asserts the common-ancestor invariants with
expect and panics on a malformed tree. Here they are
DomError::TreeInvariant, because a facade must not take the process
down over document state.