webRequest.Streamfilter.error

A string that will contain an error message after the onerror event has fired.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxOperaFirefox for Android
Basic supportChrome No support NoEdge No support NoFirefox Full support 57Opera No support NoFirefox Android Full support 57

Legend

Full support  
Full support
No support  
No support

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"]
);

Document Tags and Contributors

Contributors to this page: kernp, wbamberg
Last updated by: kernp,