diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2020-02-02 14:41:41 +0200 |
---|---|---|
committer | siikamiika <siikamiika@users.noreply.github.com> | 2020-02-09 21:51:33 +0200 |
commit | d7f0369281f8e9f036d87be392828e81d8187e74 (patch) | |
tree | 6e952d1d8a6f029f9cdca03fce6707555b8f6d18 /ext | |
parent | 91682dd63334da7acf458a320fbd48bbf7dff766 (diff) |
use Promise
Diffstat (limited to 'ext')
-rw-r--r-- | ext/bg/js/backend.js | 6 |
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; } } |