mirror of https://github.com/electron/electron
7 lines
307 B
JavaScript
7 lines
307 B
JavaScript
/* global chrome */
|
|
chrome.runtime.sendMessage({ some: 'message' }, (response) => {
|
|
const script = document.createElement('script');
|
|
script.textContent = `require('electron').ipcRenderer.send('bg-page-message-response', ${JSON.stringify(response)})`;
|
|
document.documentElement.appendChild(script);
|
|
});
|