getMatchedRules method
Returns all rules matched for the extension. Callers can optionally
filter the list of matched rules by specifying a filter.
This method is only available to extensions with the
"declarativeNetRequestFeedback" permission or having the
"activeTab" permission granted for the tabId
specified in filter.
Note: Rules not associated with an active document that were matched more
than five minutes ago will not be returned.
|filter|: An object to filter the list of matched rules.
|Returns|: Promise that resolves once the list of matched rules has been
fetched. In case of an error, the Promise will be rejected. This can
happen for multiple reasons, such as insufficient permissions, or
exceeding the quota.
Implementation
Future<RulesMatchedDetails> getMatchedRules(
MatchedRulesFilter? filter) async {
var $res = await $js.chrome.declarativeNetRequest
.getMatchedRules(filter?.toJS)
.toDart;
return RulesMatchedDetails.fromJS($res);
}