detach() {
		const detachPrevented = !this.dispatchEvent(new CustomEvent('will-detach', { cancelable: true }));
		if (detachPrevented) {
			return false;
		}

		this._setIsDetached(true);

		if (globals.windowOpener !== this) {
			if (globals.windowOpener != null) {
				globals.windowOpener._setIsDetached(false);
			}
			globals.windowOpener = this;
		}

		if (this.hasWindow) {
			return this._detachToExistingWindow();
		}

		return this._detachToNewWindow();
	}
/**
	 * Opens a detached window.
	 * @returns {Object} detached window object
	 */
Opens a detached window.
@returns {Object} detached window object
Opens a detached window . @returns { Object } detached window object
detach() {
		const detachPrevented = !this.dispatchEvent(new CustomEvent('will-detach', { cancelable: true }));
		if (detachPrevented) {
			return false;
		}
		this._setIsDetached(true);
		if (globals.windowOpener !== this) {
			if (globals.windowOpener != null) {
				globals.windowOpener._setIsDetached(false);
			}
			globals.windowOpener = this;
		}
		if (this.hasWindow) {
			return this._detachToExistingWindow();
		}
		return this._detachToNewWindow();
	}
detach ( ) { const detachPrevented = ! this . dispatchEvent ( new CustomEvent ( 'will-detach' , { cancelable : true } ) ) ; if ( detachPrevented ) { return false ; } this . _setIsDetached ( true ) ; if ( globals . windowOpener !== this ) { if ( globals . windowOpener != null ) { globals . windowOpener . _setIsDetached ( false ) ; } globals . windowOpener = this ; } if ( this . hasWindow ) { return this . _detachToExistingWindow ( ) ; } return this . _detachToNewWindow ( ) ; }
Opens a detached window.
Opens a detached window .