Returns the active set of session scoped rules for the extension.
On this page
declarativeNetRequest.getSessionRules
Syntax
let sessionRules = await browser.declarativeNetRequest.getSessionRules();
Parameters
This function takes no parameters.
Return value
A Promise
fulfilled with an array of declarativeNetRequest.Rule
objects. If no rules are active, the object 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 | |
getSessionRules |
90 | 90 | No | ? | 76 | 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/getSessionRules