updateEnabledRulesets method
Updates the set of enabled static rulesets for the extension. The
rulesets with IDs listed in options.disableRulesetIds are
first removed, and then the rulesets listed in
options.enableRulesetIds are added.
Note that the set of enabled static rulesets is persisted across sessions
but not across extension updates, i.e. the rule_resources
manifest key will determine the set of enabled static rulesets on each
extension update.
|Returns|: Promise that resolves once the update is complete. In case of
an error, the promise will be rejected and no change will be made to the
set of enabled rulesets. This can happen for multiple reasons, such as
invalid ruleset IDs, rule count limit exceeded, or internal errors.
Implementation
Future<void> updateEnabledRulesets(UpdateRulesetOptions options) async {
await $js.chrome.declarativeNetRequest
.updateEnabledRulesets(options.toJS)
.toDart;
}