mirror of https://github.com/electron/electron
10 lines
299 B
JavaScript
10 lines
299 B
JavaScript
/* global chrome */
|
|
window.completionPromise = new Promise((resolve) => {
|
|
window.completionPromiseResolve = resolve;
|
|
});
|
|
chrome.runtime.sendMessage({ some: 'message' }, () => {
|
|
chrome.runtime.getBackgroundPage((bgPage) => {
|
|
window.completionPromiseResolve(bgPage.receivedMessage);
|
|
});
|
|
});
|