Skip to content

Commit dfa8192

Browse files
committed
cleanup popup navigation
1 parent 1aa7638 commit dfa8192

3 files changed

Lines changed: 3 additions & 27 deletions

File tree

‎dist/IdentityModel.js‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12798,7 +12798,6 @@ var IdentityModel =
1279812798
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1279912799

1280012800
var CheckForPopupClosedInterval = 500;
12801-
var PopupScript = "<script>function setUrl(url){window.location=url;}</script>";
1280212801

1280312802
var PopupWindow = function () {
1280412803
function PopupWindow() {
@@ -12819,13 +12818,6 @@ var IdentityModel =
1281912818
this._popup = window.open('', '_blank', 'location=no,toolbar=no,width=500,height=500');
1282012819
if (this._popup) {
1282112820
_Log2.default.info("popup successfully created");
12822-
12823-
this._popup.document.write(PopupScript);
12824-
12825-
if (this._popup.setUrl) {
12826-
_Log2.default.info("popup successfully initialized");
12827-
}
12828-
1282912821
this._checkForPopupClosedTimer = window.setInterval(this._checkForPopupClosed.bind(this), CheckForPopupClosedInterval);
1283012822
}
1283112823
}
@@ -12845,7 +12837,7 @@ var IdentityModel =
1284512837
_Log2.default.info("Setting URL in popup");
1284612838

1284712839
this._popup.focus();
12848-
this._popup.setUrl(params.url);
12840+
this._popup.window.location = params.url;
1284912841
}
1285012842

1285112843
return this.promise;

‎sample/public/IdentityModel.js‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12798,7 +12798,6 @@ var IdentityModel =
1279812798
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1279912799

1280012800
var CheckForPopupClosedInterval = 500;
12801-
var PopupScript = "<script>function setUrl(url){window.location=url;}</script>";
1280212801

1280312802
var PopupWindow = function () {
1280412803
function PopupWindow() {
@@ -12819,13 +12818,6 @@ var IdentityModel =
1281912818
this._popup = window.open('', '_blank', 'location=no,toolbar=no,width=500,height=500');
1282012819
if (this._popup) {
1282112820
_Log2.default.info("popup successfully created");
12822-
12823-
this._popup.document.write(PopupScript);
12824-
12825-
if (this._popup.setUrl) {
12826-
_Log2.default.info("popup successfully initialized");
12827-
}
12828-
1282912821
this._checkForPopupClosedTimer = window.setInterval(this._checkForPopupClosed.bind(this), CheckForPopupClosedInterval);
1283012822
}
1283112823
}
@@ -12845,7 +12837,7 @@ var IdentityModel =
1284512837
_Log2.default.info("Setting URL in popup");
1284612838

1284712839
this._popup.focus();
12848-
this._popup.setUrl(params.url);
12840+
this._popup.window.location = params.url;
1284912841
}
1285012842

1285112843
return this.promise;

‎src/PopupWindow.js‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import Log from './Log';
55

66
const CheckForPopupClosedInterval = 500;
7-
const PopupScript = "<script>function setUrl(url){window.location=url;}</script>";
87

98
export default class PopupWindow {
109

@@ -22,13 +21,6 @@ export default class PopupWindow {
2221
this._popup = window.open('', '_blank', 'location=no,toolbar=no,width=500,height=500');
2322
if (this._popup) {
2423
Log.info("popup successfully created");
25-
26-
this._popup.document.write(PopupScript);
27-
28-
if (this._popup.setUrl) {
29-
Log.info("popup successfully initialized");
30-
}
31-
3224
this._checkForPopupClosedTimer = window.setInterval(this._checkForPopupClosed.bind(this), CheckForPopupClosedInterval);
3325
}
3426
}
@@ -49,7 +41,7 @@ export default class PopupWindow {
4941
Log.info("Setting URL in popup");
5042

5143
this._popup.focus();
52-
this._popup.setUrl(params.url);
44+
this._popup.window.location = params.url;
5345
}
5446

5547
return this.promise;

0 commit comments

Comments
 (0)