feat: add chrome.runtime.getManifest (#16891)
* feat: add chrome.runtime.getManifest * Add test for chrome.runtime.getManifest * Use IPC utils for getManifest internals
This commit is contained in:
parent
46f818b0c3
commit
8f6a543398
5 changed files with 89 additions and 0 deletions
15
spec/fixtures/extensions/chrome-api/main.js
vendored
Normal file
15
spec/fixtures/extensions/chrome-api/main.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* 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)
|
Loading…
Add table
Add a link
Reference in a new issue