CoreWebView2.CallDevToolsProtocolMethodAsync(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Runs an asynchronous DevToolsProtocol method.
public System.Threading.Tasks.Task<string> CallDevToolsProtocolMethodAsync (string methodName, string parametersAsJson);
member this.CallDevToolsProtocolMethodAsync : string * string -> System.Threading.Tasks.Task<string>
Public Function CallDevToolsProtocolMethodAsync (methodName As String, parametersAsJson As String) As Task(Of String)
Parameters
- methodName
- String
The full name of the method in the format {domain}.{method}
.
- parametersAsJson
- String
A JSON formatted string containing the parameters for the corresponding method.
Returns
A JSON string that represents the method's return object.
Remarks
For more information about available methods, navigate to DevTools Protocol Viewer. The returned task is completed when the method asynchronously completes and will return the method's return object as a JSON string. 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 await for the previous method call.