scripting.InjectionTarget
该对象包含用于指定 CSS 和 JavaScript 注入目标的详细信息。你可以在 scripting.executeScript()
、scripting.insertCSS()
和 scripting.removeCSS()
中使用该对象。
类型
该类型的取值为对象,包含如下属性:
allFrames
可选-
boolean
。脚本或 CSS 是否注入到标签页中的所有框架中。默认为false
。如果指定了frameIds
,则不能为true
。 frameIds
可选-
number
数组(array
)。要注入的框架的 ID 数组。 tabId
-
number
。要注入的标签页的 ID。
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
InjectionTarget |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
备注:
该 API 基于 Chromium 的 chrome.scripting
API。