2020-02-06 21:42:34 +00:00
|
|
|
/* global chrome */
|
|
|
|
window.completionPromise = new Promise((resolve) => {
|
2020-03-20 20:28:31 +00:00
|
|
|
window.completionPromiseResolve = resolve;
|
|
|
|
});
|
2020-02-06 21:42:34 +00:00
|
|
|
chrome.runtime.sendMessage({ some: 'message' }, (response) => {
|
|
|
|
chrome.runtime.getBackgroundPage((bgPage) => {
|
2020-03-20 20:28:31 +00:00
|
|
|
window.completionPromiseResolve(bgPage.receivedMessage);
|
|
|
|
});
|
|
|
|
});
|