Returns the set of dynamic rules for the extension.
On this page
declarativeNetRequest.getDynamicRules
Syntax
let gettingDynamicRules = browser.declarativeNetRequest.getDynamicRules();
Parameters
This function takes no parameters.
Return value
A Promise
is fulfilled with an array of 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
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 | |
getDynamicRules |
84 | 84 | No | ? | 70 | 15.4 | ? | ? | No | ? | 15.4 | ? |
© 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/getDynamicRules