webRequest.RequestFilter

这篇翻译不完整。请帮忙从英语翻译这篇文章

webRequest事件参数

Type

该参数值是一个对象,包括以下属性:

urls
字符串数组,每个字符串为模式匹配格式。当请求地址为给定模式时,事件监听器才会响应。需注意的是,仅支持http和HTTPS协议的参数地址,其他协议即使与该给定模式匹配也不会响应。
types可选
webRequest.ResourceType类型的数组,表示资源类型列表。例如:stylesheets、images、scripts。事件监听器仅响应出现在该指定列表的资源类型。
tabId可选
数值类型,与tab关联,事件监听器仅响应指定了该tabId的请求。
windowId可选
数值类型,与window关联,事件监听器仅响应指定了该windowId的请求。

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxOperaFirefox for Android
Basic supportChrome Full support YesEdge Full support 14Firefox Full support 45Opera Full support YesFirefox Android Full support 48
urlsChrome Full support YesEdge Full support 14Firefox Full support 45
Notes
Full support 45
Notes
Notes Before Firefox 56, moz-extension:// URLs were not allowed.
Opera Full support YesFirefox Android Full support 48
Notes
Full support 48
Notes
Notes Before Firefox 56, moz-extension:// URLs were not allowed.
windowIdChrome Full support YesEdge Full support 14Firefox Full support 53Opera Full support YesFirefox Android Full support 53
tabIdChrome Full support YesEdge Full support 14Firefox Full support 53Opera Full support YesFirefox Android Full support 53

Legend

Full support  
Full support
See implementation notes.
See implementation notes.

Acknowledgements

This API is based on Chromium's chrome.webRequest API. This documentation is derived from web_request.json in the Chromium code.

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

文档标签和贡献者

标签: 
此页面的贡献者: wangtonghe
最后编辑者: wangtonghe,