electron/spec/fixtures/extensions/chrome-storage/main.js

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

9 lines
339 B
JavaScript
Raw Normal View History

2019-11-01 20:37:02 +00:00
/* eslint-disable */
chrome.storage.local.set({ key: 'value' }, () => {
chrome.storage.local.get(['key'], ({ key }) => {
const script = document.createElement('script')
script.textContent = `require('electron').ipcRenderer.send('storage-success', ${JSON.stringify(key)})`
document.documentElement.appendChild(script)
})
})