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 declarativeNetRequest.ResourceType.

Developer library 6

Intercept HTTP requests

Two APIs are available for intercepting HTTP requests: webRequest and declarativeNetRequest. The webRequest API intercepts requests by adding event listeners to the various stages of an HTTP request. The extension's listeners can inspect and modify requests programmatically: getting access to request and response headers and bodies, canceling requests, and redirecting them. Use `webRequest` when your extension needs

declarativeNetRequest

e and modify network requests without notifying extensions about individual network requests. ## Permissions To use this API, an extension must request the `"declarativeNetRequest"` or `"declarativeNetRequestWithHostAccess"` [permission](/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions) in its [`manifest.json`](/docs/Mozilla/Add-ons/WebExtensions/manifest.json) file. The `"declarativeNetRequest"` permi

declarativeNetRequest.testMatchOutcome()

Checks if any of the extension's `declarativeNetRequest` rules would match a hypothetical request. Only available while testing, as this is intended to be used during extension development. See [Testing](/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest#testing) for details on how testing is enabled in each browser. ## Syntax ```js-nolint let result = await browser.declarativeNetRequest.testMatchOutcome

declarativeNetRequest.ResourceType

The resource type of a request. Comparable to webRequest.ResourceType. ## Type Values of this type are strings. Possible values are: - `beacon` - : Requests sent through the [Beacon API](/docs/Web/API/Beacon_API). - `csp_report` - : Requests sent to the report-uri given in the Content-Security-Policy header, when an attempt to violate the policy is detected. - `font` - : Web fonts loaded for a @font-face CSS

declarativeNetRequest.onRuleMatchedDebug

Fired when a rule is matched with a request. Only available extensions with the `"declarativeNetRequestFeedback"` permission, as this is intended for debugging purposes only. See [Testing](/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest#testing) for details on how testing is enabled in each browser. ## Syntax ```js-nolint browser.declarativeNetRequest.onRuleMatchedDebug.addListener(listener) browser.d

declarativeNetRequest.RuleCondition

Details of the condition that determines whether a rule matches a request, as the `condition` property of a declarativeNetRequest.Rule. ## Type Values of this type are objects. They contain these properties: - `domainType` - : A `string`. Specifies whether the network request is first-party or third-party. The request is considered first-party if it's for the same domain as the document or subdocument that init

JSON results · Services directory