背景.js:
chrome.extension.onRequest.addListener(
function(request, sender, sendResponse)
{
console.log(request.filter)
chrome.webRequest.onBeforeRequest.addListener(request.func, request.filter, ["blocking"]);
}
);
内容脚本:
chrome.extension.sendRequest(
{
func: requestInterceptor,
filter: requestFilter
}
);
该行chrome.webRequest.onBeforeRequest.addListener(request.func, request.filter, ["blocking"]);
正在触发以下错误:
Error in event handler for 'undefined': Error: Parameter 1 is required.
我该如何解决?