GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

Search e01

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

6 results across 6 corpora for webRequest.StreamFilter.onstart.

Developer library 6

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.resume()

uest that was previously suspended through a call to suspend(). You can't call this function until after the onstart event has fired. ## Syntax ```js-nolint StreamFilter.resume() ``` ### Parameters None. ### Return value None. ## Examples This example uses suspend/resume to delay a web request. ```js function listener(details) { let filter = browser.webRequest.filterResponseData(details.requestId); fil

webRequest.StreamFilter.write()

Writes some response data to the output stream. You can only call this function after the onstart event has fired. ## Syntax ```js-nolint filter.write( data // ArrayBuffer or Uint8Array ) ``` ### Parameters - `data` - : [`Uint8Array`](/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) or [`ArrayBuffer`](/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer): array of bytes containing the data t

webRequest.StreamFilter.onstart

An event handler that will be called when the stream is opened and is about to begin delivering data. From this point on, the extension may use filter functions like write(), disconnect(), or close(). ## Examples This example will replace the page content with "replacement text": ```js function listener(details) { let filter = browser.webRequest.filterResponseData(details.requestId); filter.onstart = (event)

webRequest.StreamFilter.suspend()

Suspends a request. After this is called, no more data will be delivered until the request is resumed with a call to resume(). You can't call this function until after the onstart event has fired. ## Syntax ```js-nolint filter.suspend() ``` ### Parameters None. ### Return value None. ## Examples This example uses suspend/resume to delay a web request. ```js function listener(details) { let filter = browse

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

JSON results · Services directory