A string that will contain an error message after the onerror
event has fired.
Browser compatibility
BCD tables only load in the browser
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Examples
This example adds an onerror
listener which logs the value of error
.
function listener(details) {
let filter = browser.webRequest.filterResponseData("12345");
filter.onerror = event => {
console.log(`Error: ${filter.error}`);
}
//return {}; // not needed
}
browser.webRequest.onBeforeRequest.addListener(
listener,
{urls: ["<all_urls>"], types: ["main_frame"]},
["blocking"]
);