Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/getavailablestaticrulecount/index.md
6581 views
---
title: declarativeNetRequest.getAvailableStaticRuleCount slug: Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest/getAvailableStaticRuleCount tags: - API - Add-ons - Extensions - Reference - WebExtensions - Method - declarativeNetRequest - getAvailableStaticRuleCount browser-compat: webextensions.api.declarativeNetRequest.getAvailableStaticRuleCount
---

{{AddonSidebar()}}

Returns the number of static rules that can be activated before the global static rule limit is reached.

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

{{WebExtExamples}}

Browser compatibility

{{Compat}}