aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-02-02 14:41:41 +0200
committersiikamiika <siikamiika@users.noreply.github.com>2020-02-09 21:51:33 +0200
commitd7f0369281f8e9f036d87be392828e81d8187e74 (patch)
tree6e952d1d8a6f029f9cdca03fce6707555b8f6d18 /ext/bg/js/backend.js
parent91682dd63334da7acf458a320fbd48bbf7dff766 (diff)
use Promise
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index fa1660c2..06010a95 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -630,10 +630,10 @@ class Backend {
if (this.popupWindow !== null) {
chrome.windows.remove(this.popupWindow.id);
}
- chrome.windows.create(
+ this.popupWindow = await new Promise((resolve) => chrome.windows.create(
{url, width: popupWidth, height: popupHeight, type: 'popup'},
- (popupWindow) => { this.popupWindow = popupWindow; }
- );
+ resolve
+ ));
return;
}
}