企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# chrome.devtools.* APIs 下列API模块提供了开发人员工具的部分接口,以支持您对开发人员工具进行扩展。 * [devtools.inspectedWindow](devtools.inspectedWindow.html) * [devtools.network](devtools.network.html) * [devtools.panels](devtools.panels.html) ## 如何使用 DevTools APIs 1. 1\. 在扩展的manifest中指定 "devtools_page"项: ``` { "name": ... "version": "1.0", "minimum_chrome_version": "10.0", **"devtools_page": "devtools.html"**, ... } ``` 2. 2\. 一旦开发人员工具窗口打开,将会创建一个 manifest 中 devtools_page 项指定的实例。通过使用 [devtools.panels](devtools.panels.html) ,这个页面可以在开发人员工具窗口中添加其他扩展页面,如面板或侧边栏等。 3. 3\. chrome的devtools.* API模块仅适用于在开发人员工具窗口中加载的页面。Content scripts 和其他的扩展页面无法使用这些接口。也因此,该模块仅在开发人员工具窗口的生命周期内可用。 4. 4\. 在开发人员工具窗口内扩展页面可用的接口包括所有的 [上面列举出来的 devtools 模块](#api-list) 和 [chrome.extension](extension.html) API。其他扩展API在开发人员工具页面都无法使用,您可以通过扩展的 background page 里发送请求来调用它们,这和在 [content scripts](overview.html#contentScripts) 中调用类似。 5. 5\. 还有一些开发人员工具API仍处于试验阶段。您可以通过 [chrome.experimental.* APIs](http://code.google.com/chrome/extensions/experimental.html) 获取这些API列表并了解如何使用它们。 6. 6\. [意见反馈!](http://groups.google.com/group/google-chrome-developer-tools/topics) 您的意见和建议将会帮助我们改进这些API。 ## 更多信息 想了解扩展可以使用的标准API信息,您可以访问 [chrome.* APIs](http://code.google.com/chrome/extensions/api_index.html) 和 [Other APIs](http://code.google.com/chrome/extensions/api_other.html) 。 ## 示例 您可以通过 [Samples](samples.html#devtools) 找到使用开发人员工具API的示例。