getMatchedRules method

Future<RulesMatchedDetails> getMatchedRules(
  1. MatchedRulesFilter? filter
)

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. |callback|: Called once the list of matched rules has been fetched. In case of an error, runtime.lastError will be set and no rules will be returned. This can happen for multiple reasons, such as insufficient permissions, or exceeding the quota.

Implementation

Future<RulesMatchedDetails> getMatchedRules(
    MatchedRulesFilter? filter) async {
  var $res = await promiseToFuture<$js.RulesMatchedDetails>(
      $js.chrome.declarativeNetRequest.getMatchedRules(filter?.toJS));
  return RulesMatchedDetails.fromJS($res);
}