9107157073
* feat: [extensions] support extension.getBackgroundPage * cleanup * how does c++ * tests * test for runtime.getBackgroundPage too
9 lines
302 B
JavaScript
9 lines
302 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)
|
|
})
|
|
})
|