1. Mozilla
  2. Add-ons
  3. Browser extensions
  4. JavaScript APIs
  5. declarativeNetRequest
  6. declarativeNetRequest.getSessionRules

declarativeNetRequest.getSessionRules

Returns the active set of session-scoped rules for the extension.

Syntax

js
let sessionRules = await browser.declarativeNetRequest.getSessionRules();

Parameters

filter Optional

An object to filter the list of returned rules.

ruleIds Optional

An array of integer. The IDs of the rules to return.

Return value

A Promise fulfilled with an array of declarativeNetRequest.Rule objects. If no rules are active, the object is empty. If the request fails, the promise is rejected with an error message

Examples

Example extensions

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

AltStyle によって変換されたページ (->オリジナル) /