GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

Search e01

One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.

5 results across 6 corpora for webRequest.StreamFilter.onstop.

Developer library 5

webRequest.filterResponseData()

Use this function to create a webRequest.StreamFilter object for a request. The stream filter gives the web extension full control over the stream, with the ability to monitor and modify the response. It's the extension's responsibility to write and close or disconnect the stream, as the default behavior is to keep the request open without a response. You typically call this function from a `webRequest` event listen

webRequest.StreamFilter

A `StreamFilter` is an object you use to monitor and modify HTTP responses. To create a `StreamFilter`, call webRequest.filterResponseData(), passing the ID of the web request you want to filter. You can think of the stream filter as sitting between the networking stack and the browser's rendering engine. The filter is passed HTTP response data as it's received from the network. It can examine and modify the data b

webRequest.StreamFilter.onstop

An event handler that will be called when the stream has no more data to deliver. In the event handler you can still call filter functions such as write(), disconnect(), or close(). ## Examples This example will append "extra stuff" to the response: ```js function listener(details) { const filter = browser.webRequest.filterResponseData(details.requestId); const encoder = new TextEncoder(); filter.ondata = (

webRequest.StreamFilter.status

A string that describes the current status of the request. It will be one of the following values: - `"uninitialized"` - : The filter is not fully initialized. No filter functions may be called. - `"transferringdata"` - : The underlying channel is currently transferring data, which will be routed to the extension in one or more ondata events. The extension can call filter functions such as write(), close(), or d

webRequest.StreamFilter.ondata

An event handler called repeatedly when response data is available. The handler is passed an [`Event` object](/docs/Web/API/Event) with a `data` property. The `data` property includes a chunk of the response data as an ArrayBuffer. To decode the data, use either TextDecoder or Blob. Without an `ondata` listener, you don't receive the original response body, and the output stream is empty unless write is called. ##

JSON results · Services directory