Path: blob/main/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/getdynamicrules/index.md
6546 views
------{{AddonSidebar()}}
Returns the set of dynamic rules for the extension.
Syntax
Parameters
This function takes no parameters.
Return value
A Promise is fulfilled with an array of {{WebExtAPIRef("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
{{WebExtExamples}}
Browser compatibility
{{Compat}}