feat: [extensions] background pages (#21591)

This commit is contained in:
Jeremy Apthorp 2020-01-13 14:55:58 -08:00 committed by GitHub
parent cf497ea478
commit 8bc0c92137
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 477 additions and 11 deletions

View file

@ -0,0 +1,6 @@
/* eslint-disable no-undef */
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)
})