extension.getExtensionTabs()
警告:
此方法已被弃用。请改用 extension.getViews()
。
返回表示当前扩展内运行的每个标签页的 JavaScript Window 对象的数组。如果指定了 windowId
,则仅返回附加到指定窗口的标签页的 Window 对象。
语法
js
chrome.extension.getExtensionTabs(
windowId // 可选的整型值
)
该 API 同样以 browser.extension.getExtensionTabs()
的形式可用。
参数
windowId
可选-
integer
。
返回值
object
数组(array
):全局 window 对象的数组。
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
getExtensionTabs |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Uses a non-standard name.
- Has more compatibility info.
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.extension
API。该文档衍生自 Chromium 代码中的 extension.json
。