DevToolsExtensionsExecuteDevToolsMethod Method |
Version 118.6.80
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: 118.6.80.0
Syntax public static int ExecuteDevToolsMethod(
this IBrowserHost browserHost,
int messageId,
string method,
JsonString parameters
)
public:
[ExtensionAttribute]
static int ExecuteDevToolsMethod(
IBrowserHost^ browserHost,
int messageId,
String^ method,
JsonString^ parameters
)
Parameters
- browserHost
- Type: CefSharpIBrowserHost
browser host - messageId
- Type: SystemInt32
is an incremental number that uniquely identifies the message (pass 0 to have the next number assigned
automatically based on previous values) - method
- Type: SystemString
is the method name - parameters
- Type: CefSharp.WebJsonString
are the method parameters represented as a JsonString,
which may be empty.
Return Value
Type:
Int32return 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