getDocumentFromNode.js 183 B

12345678
  1. function getDocumentFromNode(el) {
  2. return isDocument(el) ? el : el.ownerDocument;
  3. }
  4. function isDocument(node) {
  5. return node.nodeType === 9;
  6. }
  7. export { getDocumentFromNode };