Diga.WebView2 icon indicating copy to clipboard operation
Diga.WebView2 copied to clipboard

how to access DevTools?

Open PaulYBChiang opened this issue 11 months ago • 1 comments

for webview2, we could: string result = await webView.CoreWebView2.CallDevToolsProtocolMethodAsync(methodName, parameters);

in Diga.WebView2.WinForms.WebView, how to call CallDevToolsProtocolMethodAsync?

i found only these items: public bool DevToolsEnabled public void OpenDevToolsWindow()

PaulYBChiang avatar Feb 10 '25 13:02 PaulYBChiang

You can use webView.WebView2.CallDevToolsProtocolMethod

//signature
public void CallDevToolsProtocolMethod([In, MarshalAs(UnmanagedType.LPWStr)] string methodName, [In, MarshalAs(UnmanagedType.LPWStr)] string parametersAsJson, [In, MarshalAs(UnmanagedType.Interface)] ICoreWebView2CallDevToolsProtocolMethodCompletedHandler handler)

DIGAToDIGA avatar Feb 10 '25 13:02 DIGAToDIGA