use Promise
This commit is contained in:
parent
91682dd633
commit
d7f0369281
@ -630,10 +630,10 @@ class Backend {
|
|||||||
if (this.popupWindow !== null) {
|
if (this.popupWindow !== null) {
|
||||||
chrome.windows.remove(this.popupWindow.id);
|
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'},
|
{url, width: popupWidth, height: popupHeight, type: 'popup'},
|
||||||
(popupWindow) => { this.popupWindow = popupWindow; }
|
resolve
|
||||||
);
|
));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user