here is the code I use in my Chrome extension. It's an extension that for now just intercepts the requests and prints them in the pop-up.
<script>
function interceptRequest(request) {
var p = document.createElement("p");
var text = document.createTextNode("" + request.method + " " + request.url + " " + request.headers);
p.appendChild(text);
document.body.appendChild(p);
document.body.append(request.url);
}
chrome.webRequest.onBeforeRequest.addListener(interceptRequest, null, ['blocking']);
</script>
When I do "inspect pop-up" by right clicking on the extension's icon I get this error from the console: Uncaught Error: Parameter 1 is required. extensions/schema_generated_bindings.js:69
Does anyone know what's going on? It used to work a couple of months ago, then I stopped working on this and now it doesn't work anymore.
Thanks
here is the code I use in my Chrome extension. It's an extension that for now just intercepts the requests and prints them in the pop-up.
<script>
function interceptRequest(request) {
var p = document.createElement("p");
var text = document.createTextNode("" + request.method + " " + request.url + " " + request.headers);
p.appendChild(text);
document.body.appendChild(p);
document.body.append(request.url);
}
chrome.webRequest.onBeforeRequest.addListener(interceptRequest, null, ['blocking']);
</script>
When I do "inspect pop-up" by right clicking on the extension's icon I get this error from the console: Uncaught Error: Parameter 1 is required. extensions/schema_generated_bindings.js:69
Does anyone know what's going on? It used to work a couple of months ago, then I stopped working on this and now it doesn't work anymore.
Thanks
Share Improve this question asked Jan 7, 2012 at 14:43 MasiarMasiar 21.4k31 gold badges100 silver badges140 bronze badges1 Answer
Reset to default 9It seems that the second parameter of chrome.webRequest.onBeforeRequest.addListener (trunk of chrome extensions doc) is no more optional.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745553273a4632675.html
评论列表(0条)