我想捕获Google Chrome中所有标签内的POST请求错误。
我使用以下代码块来观察扩展中onErrorOccurred的触发:
chrome.webRequest.onErrorOccurred.addListener(
function(details) {
console.log("xxxxx");
console.log(details);
},
{urls: ["<all_urls>"]});
但遗憾的是,此代码无法观察到错误代码503.例如,我创建了以下页面,返回错误503.
我还测试了以下与WebNavegation类相关的代码,但它也不起作用:
https://developer.chrome.com/extensions/examples/api/webNavigation/basic.zip
如果有人可以帮助我,那就太棒了。
提前致谢。