ICoreWebView2.CallDevToolsProtocolMethod

Runs an asynchronous DevToolsProtocol method. For more information about available methods, navigate to DevTools Protocol Viewer

. The methodName parameter is the full name of the method in the {domain}.{method} format. The parametersAsJson parameter is a JSON formatted string containing the parameters for the corresponding method. The Invoke method of the handler is run when the method asynchronously completes. Invoke is run with the return object of the method as a JSON string. This function returns E_INVALIDARG if the methodName is unknown or the parametersAsJson has an error. In the case of such an error, the returnObjectAsJson parameter of the handler will include information about the error. Note even though WebView2 dispatches the CDP messages in the order called, CDP method calls may be processed out of order. If you require CDP methods to run in a particular order, you should wait for the previous method's completed handler to run before calling the next method.

\snippet ScriptComponent.cpp CallDevToolsProtocolMethod

interface ICoreWebView2
HRESULT
CallDevToolsProtocolMethod

Meta