electron/spec-main/fixtures/extensions/lazy-background-page/runtime-get-background-page.js
2020-03-20 13:28:31 -07:00

9 lines
307 B
JavaScript

/* global chrome */
window.completionPromise = new Promise((resolve) => {
window.completionPromiseResolve = resolve;
});
chrome.runtime.sendMessage({ some: 'message' }, (response) => {
chrome.runtime.getBackgroundPage((bgPage) => {
window.completionPromiseResolve(bgPage.receivedMessage);
});
});