electron/spec/fixtures/extensions/lazy-background-page/get-background-page.js

8 lines
280 B
JavaScript
Raw Normal View History

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