Returns the number of static rules that can be activated before the global static rule limit is reached.
On this page
declarativeNetRequest.getAvailableStaticRuleCount
Syntax
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 | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
getAvailableStaticRuleCount |
89 | 89 | No | ? | 75 | No | ? | ? | No | ? | No | ? |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest/getAvailableStaticRuleCount