Resumes a request that was previously suspended through a call to suspend()
.
You can't call this function until after the onstart
event has fired.
StreamFilter.resume()
None.
None.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
resume |
No |
No |
57 |
? |
No |
No |
? |
? |
57 |
? |
? |
? |
This example uses suspend/resume to delay a web request.
function listener(details) { let filter = browser.webRequest.filterResponseData(details.requestId); filter.onstart = event => { filter.suspend(); setTimeout(() => { filter.resume(); filter.disconnect(); }, 1000); } } browser.webRequest.onBeforeRequest.addListener( listener, {urls: ["https://example.org/"], types: ["main_frame"]}, ["blocking"] );
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest/StreamFilter/resume