declarativeNetRequest.MatchedRule
一個描述匹配規則的物件。此型別可能由 declarativeNetRequest.getMatchedRules 或 declarativeNetRequest.testMatchOutcome 方法返回,或者透過 declarativeNetRequest.onRuleMatchedDebug 事件觀察到。
型別
此型別的值是物件。它們包含以下屬性:
extensionId-
一個
string。擴充套件程式的 ID,如果此規則屬於其他擴充套件程式。僅當使用declarativeNetRequest.testMatchOutcome方法並設定includeOtherExtensions選項為true時,此屬性才可用。 ruleId-
一個
number。匹配規則的 ID。 rulesetId-
一個
string。此規則所屬的 規則集 的 ID。返回的值是- 對於源自靜態規則集的規則,則是在
declarative_net_request.rule_resources manifest 鍵中規則集的 "id" 鍵指定的值。 - 對於源自動態規則集的規則,則是在
declarativeNetRequest.DYNAMIC_RULESET_ID中定義的值,即"_dynamic"。 - 對於源自會話規則集的規則,則是在
declarativeNetRequest.SESSION_RULESET_ID中定義的值,即"_session"。
- 對於源自靜態規則集的規則,則是在
瀏覽器相容性
載入中…