import { getDocument } from "./getDocument" ; let _window ; try { _window = window ; } catch ( e ) { } /**
 * Returns `element.ownerDocument.defaultView || window`.
 */ export function getWindow ( element ? ) { if ( ! element ) { return _window ; } return getDocument ( element ) . defaultView || _window ; }