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

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

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

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