const filter = {
url: [{ hostContains: "example.com" }, { hostPrefix: "developer" }],
};
function logOnErrorOccurred(details) {
console.log(`onErrorOccurred: ${details.url}`);
console.log(details.error);
}
browser.webNavigation.onErrorOccurred.addListener(logOnErrorOccurred, filter);webNavigation.onErrorOccurred / notebook
webNavigation.onErrorOccurred
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.