Gets the parent window of a DOM node with regards of being inside of an iframe.
(node: HTMLElement)
| 272 | |
| 273 | /** Gets the parent window of a DOM node with regards of being inside of an iframe. */ |
| 274 | function getWindow(node: HTMLElement): Window { |
| 275 | // ownerDocument is null if `node` itself *is* a document. |
| 276 | return (node.ownerDocument && node.ownerDocument.defaultView) || window; |
| 277 | } |