Is it possible to open the webview inspector via code?
- skinkairewalker
- Enthusiast

- Posts: 799
- Joined: Fri Dec 04, 2015 9:26 pm
Is it possible to open the webview inspector via code?
Hello everyone !
Re: Is it possible to open the webview inspector via code?
Hm ... with my WebView2Gadget() you can simply call:
WebView2OpenDevToolsWindow(#WebGadget)
Maybe you can use it during development.
In my pbi I implement it this way:
WebView2OpenDevToolsWindow(#WebGadget)
Maybe you can use it during development.
In my pbi I implement it this way:
Code: Select all
Procedure WebView2OpenDevToolsWindow(Gadget.i)
Protected *Gadget.WebView2Gadget_Structure
*Gadget = FindMapElement(WebView2GadgetMap(), Str(Gadget))
If *Gadget
*Gadget\wvCore\OpenDevToolsWindow()
EndIf
EndProcedure
Re: Is it possible to open the webview inspector via code?
But ...
there is a flag #PB_WebView_Debug for the WebViewGadget()
there is a flag #PB_WebView_Debug for the WebViewGadget()
- skinkairewalker
- Enthusiast

- Posts: 799
- Joined: Fri Dec 04, 2015 9:26 pm
Re: Is it possible to open the webview inspector via code?
awesome 
thanks infratec
thanks infratec
Re: Is it possible to open the webview inspector via code?
Code: Select all
Procedure WebViewGadget_OpenDevToolsWindow(WebViewGadget)
If IsGadget(WebViewGadget) = 0 : ProcedureReturn : EndIf
If GadgetType(WebViewGadget) <> #PB_GadgetType_WebView : ProcedureReturn : EndIf
Protected Controller.ICoreWebView2Controller
Protected Core.ICoreWebView2
Controller = GetGadgetAttribute(WebViewGadget, #PB_WebView_ICoreController)
Controller\get_CoreWebView2(@Core)
Core\OpenDevToolsWindow()
EndProcedureHygge
- skinkairewalker
- Enthusiast

- Posts: 799
- Joined: Fri Dec 04, 2015 9:26 pm
Re: Is it possible to open the webview inspector via code?
sugooy
thanks Kiffi
thanks Kiffi

