electron/spec/fixtures/extensions/chrome-api/main.js
Samuel Maddock 8f6a543398 feat: add chrome.runtime.getManifest (#16891)
* feat: add chrome.runtime.getManifest

* Add test for chrome.runtime.getManifest

* Use IPC utils for getManifest internals
2019-02-13 07:16:12 -10:00

15 lines
321 B
JavaScript

/* global chrome */
const testMap = {
getManifest () {
const manifest = chrome.runtime.getManifest()
console.log(JSON.stringify(manifest))
}
}
const dispatchTest = (event) => {
const testName = event.data
const test = testMap[testName]
test()
}
window.addEventListener('message', dispatchTest, false)