本文介绍了webkit/chrome的WebInspector资源检查如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我总是想知道资源检查在webkit/safari/chrome的WebInspector工作中使用.

I always want to know how the resource inspection work in webkit/safari/chrome's WebInspector work.

浏览器必须为JavaScript提供本机BPI或某些内容以显示查询列表及其时间轴,二进制API称为什么?我可以使用相同的API编写Chromium扩展程序吗?

The browser must provide a native BPI or something for javascript to display list of queries and their timelines, what is the binary API called? Can I use the same API to write a Chromium extension?

推荐答案

资源请求和其他与DevTools/WebInspector相关的数据由InspectorController及其代理收集. (只是C ++代码)

The resource requests and other DevTools/WebInspector related data is collecting by InspectorController and it's agents. (it just C++ code)

之后,所有数据作为WebInspector对象的方法的JS调用被推送到WebInspector中.

After that all the data is pushing into WebInspector as JS calls of WebInspector object's methods.

您可能知道所有DevTools/WebInspector的GUI都是一个html页面和许多JavaScript.

As you probably know all the DevTools/WebInspector's GUI is an html page and a lot of JavaScript.

您可以尝试通过Inspector本身来调查Inspector的内部世界.

You can try to investigate the internal world of Inspector by Inspector itself.

  1. 使用标志启动Chrome--process-per-tab;
  2. 以非停靠模式打开Inspector窗口;
  3. 在检查器窗口中按Ctrl-Shift-I.
  1. start Chrome with flag--process-per-tab;
  2. open Inspector window in undocked mode;
  3. press Ctrl-Shift-I in Inspector window.

检查器和被检查页面之间的所有流量都通过两个函数传递:从检查器到检查页面- sendMessageToBackend 从检查页面到检查器- devtools $$ dispatch

All the traffic between Inspector and inspected page are passing via two functions:from Inspector to inspected page - sendMessageToBackendfrom inspected page to Inspector - devtools$$dispatch

您可以通过链接.

这篇关于webkit/chrome的WebInspector资源检查如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-11 01:30