declarativeNetRequest.getEnabledRulesets

返回已启用的静态规则集的 ID。

语法

js
let rulesetIds = await browser.declarativeNetRequest.getEnabledRulesets();

参数

此函数不接受任何参数。

返回值

一个 Promise,其会兑现一个包含静态规则集 ID 的字符串数组。如果没有启用的规则,则数组为空。如果请求失败,promise 将以错误消息拒绝。

示例

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
getEnabledRulesets

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support