declarativeNetRequest.getSessionRules
返回扩展的一组活跃的活动会话范围规则。
语法
js
let sessionRules = await browser.declarativeNetRequest.getSessionRules();
参数
filter
可选-
一个用于过滤返回的规则列表的对象。
ruleIds
可选-
一个包含
integer
的数组。要返回的规则的 ID。
返回值
一个 Promise
,其会兑现一个 declarativeNetRequest.Rule
对象的数组。如果没有活动的规则,则对象为空。如果请求失败,promise 将被拒绝并带有错误消息。
示例
示例扩展
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
getSessionRules | |||||||
filter |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.