CEFSHARP- ONDEVTOOLSMESSAGE
OnDevToolsMessage 函数的说明如下: https://cefsharp.github.io/api/94.4.x/html/M_CefSharp_Callback_IDevToolsMessageObserver_OnDevToolsMessage.htm
收到 DevTools 协议消息后将调用的方法。 方法结果字典包含一个“id”(int)值,用于标识 从 IBrowserHost.SendDevToolsMessage 发送的原始方法调用, 以及可选的“结果”(字典)或“错误”(字典) 价值。 “错误”字典将包含“代码”(int)和“消息” (字符串)值。事件字典包含“方法”(字符串)值 以及可选的“params”(字典)值。查看开发工具 协议文档位于 https://chromedevtools.github.io/devtools-protocol/ 了解详细信息 支持的方法调用和预期的“结果”或“参数” 字典内容。 JSON 字典可以使用以下方式解析 如果需要,可以使用 CefParseJSON 函数,但要注意性能 解析大消息时的注意事项(其中一些可能超过 大小为 1MB)。
但在 Browserhost 方法中 - 有两个函数: -执行DevTools方法 -SendDevToolsMessage
那么我就不清楚了——如果根据描述,调用OnDevToolsMessage函数调用了OnDevToolsMessage函数,那么ExecuteDevToolsMethod函数是做什么的?它调用什么函数?
The Description for the OnDevToolsMessage function says: https://cefsharp.github.io/api/94.4.x/html/M_CefSharp_Callback_IDevToolsMessageObserver_OnDevToolsMessage.htm
Method that will be called on receipt of a DevTools protocol message.
Method result dictionaries include an "id" (int) value that identifies
the orginating method call sent from IBrowserHost.SendDevToolsMessage,
and optionally either a "result" (dictionary) or "error" (dictionary)
value. The "error" dictionary will contain "code" (int) and "message"
(string) values. Event dictionaries include a "method" (string) value
and optionally a "params" (dictionary) value. See the DevTools
protocol documentation at
https://chromedevtools.github.io/devtools-protocol/ for details of
supported method calls and the expected "result" or "params"
dictionary contents. JSON dictionaries can be parsed using the
CefParseJSON function if desired, however be aware of performance
considerations when parsing large messages (some of which may exceed
1MB in size).
But in the Browserhost method - there are two functions:
-ExecuteDevToolsMethod
-SendDevToolsMessage
Then it is not clear to me - if, according to the description, calling the OnDevToolsMessage function calls the OnDevToolsMessage function, then what does the ExecuteDevToolsMethod function do?? What function does it call ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论