【发布时间】:2011-11-22 07:12:42
【问题描述】:
我尝试测试WebRequest APIs 的示例,但抛出错误:
"onBeforeRequest" 只能在扩展进程中使用。 manifest.json:
{
"name": "example",
"version": "1.0",
"permissions": [
"experimental",
"http://*/*", "https://*/*"
],
"content_scripts": [ {
"js": [ "foo.js" ],
"matches": [ "http://*/*", "https://*/*" ],
"run_at": "document_start"
} ]
}
foo.js 正是例子 1
【问题讨论】:
标签: google-chrome-extension webrequest