electron/spec/fixtures/extensions/mv3-service-worker/main.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
353 B
JavaScript
Raw Normal View History

/* 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);