Nitpick, we can lose the outer ! and make that an or, readability + efficiency ;) `(typeof document === "undefined" || rootNode.ownerDocument !== document)`