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

7 lines
272 B
JavaScript

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