`.selectedContainer` with non-collapsed selections

Is `$anchor[0].nodeType` the same as `selection.anchorNode.nodeType` ?