Click or drag to resize

DevToolsExtensionsExecuteDevToolsMethod Method

Version 102.0.100
Execute a method call over the DevTools protocol. This is a more structured version of SendDevToolsMessage. See the DevTools protocol documentation at for details of supported methods and the expected parameters JSON message format. See the SendDevToolsMessage documentation for additional usage information.

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


Type: CefSharpIBrowserHost
browser host
Type: SystemInt32
is an incremental number that uniquely identifies the message (pass 0 to have the next number assigned automatically based on previous values)
Type: SystemString
is the method name
Type: CefSharp.WebJsonString
are the method parameters represented as a JsonString, which may be empty.

Return Value

Type: 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