0
私はonBeforeRequestトリガーにしようとしていますが、onBeforeRequestがトリガーしていません:予想された 'オブジェクト'が '配列'を持っています
background page consoleエラーが表示さ:
Invalid value for argument 1. Expected 'object' but got 'array'
manifest.jsonを:
{
"name": "Blocker",
"version": "1.0",
"description": "Blocks all websites",
"permissions": ["webRequest", "webRequestBlocking", "<all_urls>"],
"background": {
"scripts": ["background.js"]
},
"manifest_version": 2
}
background.js:
chrome.webRequest.onBeforeRequest.addListener(
function(info) {
console.log("TRIGGERED")
return {cancel: true};
},
// extraInfoSpec
["blocking"]);
私が間違っていたり、午前何をやっています私はちょうど電子BeeforeRequestは何もしないと考えていますか?たとえば、私は次のことを期待する:
- 私はウェブサイトが
- ユーザーは、ウェブサイトが
はい、私は次のエラーが表示されます:http://prntscr.com/ef6pij – Stanko