declarativeNetRequest.MatchedRule

描述匹配规则的对象。此类型可能由 declarativeNetRequest.getMatchedRulesdeclarativeNetRequest.testMatchOutcome 方法返回,也可以通过 declarativeNetRequest.onRuleMatchedDebug 事件观察到。

类型

此类型的值为对象,包含以下属性:

extensionId

string。如果此规则属于其他扩展,则为该扩展的 ID。仅当与 declarativeNetRequest.testMatchOutcome 一起使用,且将 includeOtherExtensions 选项设置为 true 时,才可用此属性。

ruleId

number。匹配规则的 ID。

rulesetId

string。此规则所属的规则集的 ID。返回的值为:

浏览器兼容性

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

Legend

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

Full support
Full support
No support
No support