Click or drag to resize

DevToolsExtensionsExecuteDevToolsMethod Method

Version 130.1.90
Execute a method call over the DevTools protocol. This is a more structured version of SendDevToolsMessage. See the DevTools protocol documentation at https://chromedevtools.github.io/devtools-protocol/ for details of supported methods and the expected parameters JSON message format. See the SendDevToolsMessage documentation for additional usage information.

Namespace: CefSharp
Assembly: CefSharp.Core (in CefSharp.Core.dll) Version: 129.0.110.0
Syntax
public static int ExecuteDevToolsMethod(
	this IBrowserHost browserHost,
	int messageId,
	string method,
	JsonString parameters
)

Parameters

browserHost  IBrowserHost
browser host
messageId  Int32
is an incremental number that uniquely identifies the message (pass 0 to have the next number assigned automatically based on previous values)
method  String
is the method name
parameters  JsonString
are the method parameters represented as a JsonString, which may be empty.

Return Value

Int32
return the assigned message Id if called on the CEF UI thread and the message was successfully submitted for validation, otherwise 0

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IBrowserHost. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also