MDN self-hosted library · e01.org

declarativeNetRequest.getSessionRules()

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

no runnable cells webextension-api-function upstream source

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

Syntax

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

Parameters

  • filter
  • : An object to filter the list of returned rules.
    • ruleIds
    • : 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

Browser compatibility