The operation to be performed on a header.
The operation to be performed on a header.
Specifies whether the network request is first-party or third-party to the domain from which it originated. If omitted, all requests are matched.
The new scheme for the request.
How the requested resource will be used. Comparable to the webRequest.ResourceType type.
Describes the reason why a given regular expression isn't supported.
ConstDYNAMIC_Ruleset ID for the dynamic rules added by the extension.
ConstGUARANTEED_The minimum number of static rules guaranteed to an extension across its enabled static rulesets. Any rules above this limit will count towards the global static rule limit.
ConstMAX_The maximum number of dynamic and session rules an extension can add. NOTE: in the Firefox we are enforcing this limit to the session and dynamic rules count separately, instead of enforcing it to the rules count for both combined as the Chrome implementation does.
ConstMAX_The maximum number of static Rulesets an extension can enable at any one time.
ConstMAX_The maximum number of regular expression rules that an extension can add. This limit is evaluated separately for the set of session rules, dynamic rules and those specified in the rule_resources file.
ConstMAX_The maximum number of static Rulesets an extension can specify as part of the rule_resources manifest key.
ConstSESSION_Ruleset ID for the session-scoped rules added by the extension.
Returns the remaining number of static rules an extension can enable
Returns the current set of dynamic rules for the extension.
Returns the ids for the current set of enabled static rulesets.
Returns the current set of session scoped rules for the extension.
Checks if the given regular expression will be supported as a 'regexFilter' rule condition.
Checks if any of the extension's declarativeNetRequest rules would match a hypothetical request.
The details of the request to test.
Optionaloptions: _TestMatchOutcomeOptionsModifies the current set of dynamic rules for the extension. The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added. These rules are persisted across browser sessions and extension updates.
Returns the ids for the current set of enabled static rulesets.
Modifies the current set of session scoped rules for the extension. The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added. These rules are not persisted across sessions and are backed in memory.
Use the declarativeNetRequest API to block or modify network requests by specifying declarative rules.
Permissions:
declarativeNetRequest,declarativeNetRequestWithHostAccessNot allowed in: Content scripts, Devtools pages