DevToolsExtensionsExecuteDevToolsMethodAsync(IChromiumWebBrowserBase, Int32, String, IDictionaryString, Object) Method |
Version 130.1.90
Execute a method call over the DevTools protocol. This is a more structured
version of SendDevToolsMessage.
ExecuteDevToolsMethod(IBrowserHost, Int32, String, JsonString) can only be called on the
CEF UI Thread, this method can be called on any thread.
See the DevTools protocol documentation at https://chromedevtools.github.io/devtools-protocol/ for details
of supported methods and the expected
parameters dictionary contents.
See the SendDevToolsMessage documentation for additional usage information.
Namespace: CefSharpAssembly: CefSharp.Core (in CefSharp.Core.dll) Version: 129.0.110.0
Syntax public static Task<int> ExecuteDevToolsMethodAsync(
this IChromiumWebBrowserBase chromiumWebBrowser,
int messageId,
string method,
IDictionary<string, Object> parameters = null
)
public:
[ExtensionAttribute]
static Task<int>^ ExecuteDevToolsMethodAsync(
IChromiumWebBrowserBase^ chromiumWebBrowser,
int messageId,
String^ method,
IDictionary<String^, Object^>^ parameters = nullptr
)
Parameters
- chromiumWebBrowser IChromiumWebBrowserBase
- the ChromiumWebBrowser instance
- 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 IDictionaryString, Object (Optional)
- are the method parameters represented as a dictionary,
which may be empty.
Return Value
TaskInt32return a Task that can be awaited to obtain the assigned message Id. If the message was
unsuccessfully submitted for validation, this value will be 0.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IChromiumWebBrowserBase. 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