mirror of https://github.com/electron/electron
14 lines
353 B
JavaScript
14 lines
353 B
JavaScript
/* global chrome */
|
|
|
|
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
|
sendResponse(message);
|
|
});
|
|
|
|
window.addEventListener('message', (event) => {
|
|
if (event.data === 'fetch-confirmation') {
|
|
chrome.runtime.sendMessage('fetch-confirmation', response => {
|
|
console.log(JSON.stringify(response));
|
|
});
|
|
}
|
|
}, false);
|