declarativeNetRequest.getDynamicRules
返回扩展的动态规则集。
语法
js
let gettingDynamicRules = browser.declarativeNetRequest.getDynamicRules();
参数
filter
可选-
一个用于过滤返回规则列表的对象。
ruleIds
可选-
一个包含
integer
的数组。要返回的规则的 ID。
返回值
一个 Promise
,其会兑现一个 declarativeNetRequest.Rule
对象的数组。每个对象表示一个属于扩展的规则。如果没有活动的规则,则数组为空。如果请求失败,promise 将被拒绝并带有错误消息。
示例
示例扩展
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
getDynamicRules | |||||||
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.