Monitoring errors in the WebViewGadget?

Just starting out? Need help? Post your questions and find answers here.
Seymour Clufley
Addict
Addict
Posts: 1266
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Monitoring errors in the WebViewGadget?

Post by Seymour Clufley »

I love the new WebViewGadget, but one thing that is missing is the ability to track anything going wrong in the javascript. In a browser, this kind of thing is reported in the console. Is there any way, or will be there be any way, to access this in the WebViewGadget?
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
infratec
Always Here
Always Here
Posts: 7664
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Monitoring errors in the WebViewGadget?

Post by infratec »

Of course it is possible.

I do it in my WebView2Gadget()

Code: Select all

Procedure WebView2OpenDevToolsWindow(Gadget.i)
  
  Protected *Gadget.WebView2Gadget_Structure
  
  *Gadget = FindMapElement(WebView2GadgetMap(), Str(Gadget))
  If *Gadget
    *Gadget\wvCore\OpenDevToolsWindow()
  EndIf
  
EndProcedure
Seymour Clufley
Addict
Addict
Posts: 1266
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Re: Monitoring errors in the WebViewGadget?

Post by Seymour Clufley »

Hopefully this will be added for PB's native WebViewGadget.
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
User avatar
the.weavster
Addict
Addict
Posts: 1581
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: Monitoring errors in the WebViewGadget?

Post by the.weavster »

It's available in the webview library PB is using under the hood so it shouldn't be difficult for Fred to add the feature:

Code: Select all

webview_create(0, *window) ; no dev tools
webview_create(1, *window) ; has dev tools
Post Reply