declarativeNetRequest.getDynamicRules

Returns the set of dynamic rules for the extension.

Syntax

js
let gettingDynamicRules = await browser.declarativeNetRequest.getDynamicRules();

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 is fulfilled with an array of declarativeNetRequest.Rule objects. Each of these represents a rule that belongs to the extension. If no rules are active, the array is empty. If the request fails, the promise is rejected with an error message.

Examples

Example extensions

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
getDynamicRules
Chrome – Full support
Chrome 84 (Release date: 2020-07-27)
footnote Full support
Edge – Full support
Edge 84 (Release date: 2020-07-16)
footnote Full support
Firefox – Full support
Firefox 113 (Release date: 2023-05-09)
footnote Full support
Opera – Full support
Opera 70 (Release date: 2020-07-27)
footnote Full support
Safari – Full support
Safari 15.4 (Release date: 2022-03-14)
footnote Full support
Firefox for Android – Full support
Firefox for Android 113 (Release date: 2023-05-09)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15.4 (Release date: 2022-03-14)
footnote Full support
filter
Chrome – Full support
Chrome 111 (Release date: 2023-03-07)
footnote Full support
Edge – Full support
Edge 111 (Release date: 2023-03-13)
footnote Full support
Firefox – Full support
Firefox 127 (Release date: 2024-06-11)
footnote Full support
Opera – Full support
Opera 97 (Release date: 2023-03-22)
footnote Full support
Safari – Full support
Safari 18.5 (Release date: 2025-05-12)
footnote Full support
Firefox for Android – Full support
Firefox for Android 127 (Release date: 2024-06-11)
footnote Full support
Safari on iOS – Full support
Safari on iOS 18.5 (Release date: 2025-05-12)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support