Skip to content

Commit a66f2e0

Browse files
committed
get popup window but thsi doen't work uhm maybe due to cors
1 parent 427c302 commit a66f2e0

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Scripts/WindowManager.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ function Dialog(object, create) {
6060
this._height = 0;
6161
this._isMinWidth = false;
6262
this._isMinHeight = false;
63+
64+
/** @type {Window?} */
65+
this._popupWindow = null;
6366

6467
this.z = 0;
6568
this.minWidth = 100;
@@ -213,7 +216,7 @@ Dialog.prototype.initWithObject = function (object) {
213216
top: rect.top + viewboxPosition.top
214217
}
215218

216-
window.open(dialog.href, dialog.title, stringifyDialogProperties(propeties));
219+
this._popupWindow = window.open(dialog.href, dialog.title, stringifyDialogProperties(propeties));
217220
dialog.quit();
218221
});
219222

@@ -375,6 +378,10 @@ Object.defineProperty(Dialog.prototype, "borderSize", {
375378
get: function () { return fromPixels(this.content.style.padding); },
376379
});
377380

381+
Object.defineProperty(Dialog.prototype, "popup", {
382+
get: function() { return this._popupWindow; }
383+
});
384+
378385
/** @type {Dialog} */
379386
/*let*/var focusedDialog = null;
380387
Dialog.prototype.focus = function() {

0 commit comments

Comments
 (0)