Sha256: b017d8965e81fb1896cd7fc79d163b6074627bea776bf57f22e7ad95d2e79e37
Contents?: true
Size: 639 Bytes
Versions: 26
Compression:
Stored size: 639 Bytes
Contents
function getWindow(node) { var _node_ownerDocument; if (isDocument(node) && node.defaultView) { return node.defaultView; } else if ((_node_ownerDocument = node.ownerDocument) === null || _node_ownerDocument === void 0 ? void 0 : _node_ownerDocument.defaultView) { return node.ownerDocument.defaultView; } throw new Error(`Could not determine window of node. Node was ${describe(node)}`); } function isDocument(node) { return node.nodeType === 9; } function describe(val) { return typeof val === 'function' ? `function ${val.name}` : val === null ? 'null' : String(val); } export { getWindow };
Version data entries
26 entries across 26 versions & 1 rubygems