From 0b34f7cd61a045a915cffcedc8fc058d6df6feee Mon Sep 17 00:00:00 2001 From: shrey Date: Mon, 10 Jan 2022 13:33:11 +0530 Subject: [PATCH] Setting URI when window is open --- dist/promise-window.js | 3 +-- dist/promise-window.min.js | 2 +- src/promise-window.js | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dist/promise-window.js b/dist/promise-window.js index c47ef60..2c7feae 100644 --- a/dist/promise-window.js +++ b/dist/promise-window.js @@ -338,12 +338,11 @@ /** * Changes the URI * @param {String} uri The new URI - * @throws {Error} If the window is open * @return {PromiseWindow} Returns this object to allow chaining */ prototype.setURI = function setURI(uri) { if (this.isOpen()) { - throw new Error('Cannot change the URI while the window is open'); + this._window.location.href = uri; } this.uri = uri; return this; diff --git a/dist/promise-window.min.js b/dist/promise-window.min.js index 3edf226..9f4f22b 100644 --- a/dist/promise-window.min.js +++ b/dist/promise-window.min.js @@ -1 +1 @@ -!function(){"use strict";function e(){var e,i,t=arguments[0];for(i=1;i