declarativeNetRequest.getAvailableStaticRuleCount

Returns the number of static rules that can be activated before the global static rule limit is reached. See static ruleset limits for more information on the static ruleset and rule limits.

Syntax

js
let count = await browser.declarativeNetRequest.getAvailableStaticRuleCount();

Parameters

This function takes no parameters.

Return value

A Promise fulfilled with a number that indicates how many static rules can enable before the global static rule limit is reached. If the request fails, the promise is rejected with an error message.

Examples

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
getAvailableStaticRuleCount
Chrome – Full support
Chrome 89 (Release date: 2021-03-02)
footnote Full support
Edge – Full support
Edge 89 (Release date: 2021-03-04)
footnote Full support
Firefox – Full support
Firefox 113 (Release date: 2023-05-09)
footnote Full support
Opera – Full support
Opera 75 (Release date: 2021-03-24)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 113 (Release date: 2023-05-09)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support

Legend

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

Full support
Full support
No support
No support