use Promise

This commit is contained in:
siikamiika 2020-02-02 14:41:41 +02:00
parent 91682dd633
commit d7f0369281

View File

@ -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;
}
}