how to open devtoolswindow from application.

Re: how to open devtoolswindow from application.

Postby Horizon » Sat Jul 08, 2023 9:47 am

Antonio Linares wrote:Dear Hakan,

It may be something that has changed inside webview.dll. We have not modified FWH code.

You may open an issue in https://github.com/webview/webview


I definitely think the same.

Thanks.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: how to open devtoolswindow from application.

Postby Antonio Linares » Sat Jul 08, 2023 9:56 am

what menuitem is missing ? I can't understand what you posted...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: how to open devtoolswindow from application.

Postby Horizon » Sat Jul 08, 2023 10:09 am

Antonio Linares wrote:what menuitem is missing ? I can't understand what you posted...

Hi Antonio,

When the right button is pressed in Webview, "Inspect" should appear on the bottom line of the menu that opens.

The pictures I sent are in Turkish. Somehow, although my Microsoft Edge browser is in English, I could not make the webview browser in English. It probably accepts windows language.

"Inspect" is the Turkish version of "İncele" in the pictures. As you know, the "Inspect" menuitem opens the devtoolsboxwindow.

http://www.objekt.com.tr/fwh_test/webview_menu_before.png
Image
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: how to open devtoolswindow from application.

Postby Antonio Linares » Sat Jul 08, 2023 10:29 am

Dear Hakan,

https://learn.microsoft.com/en-us/microsoft-edge/webview2/how-to/context-menus?tabs=cpp#adding-menu-items-to-a-context-menu

thats not simple at all and it would require some hours (if not days) of coding and debugging
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: how to open devtoolswindow from application.

Postby Antonio Linares » Sat Jul 08, 2023 10:52 am

Implemented :-D

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: how to open devtoolswindow from application.

Postby Horizon » Sat Jul 08, 2023 10:54 am

Thank you Antonio, Mr. Navarro,

I have solved my problem. I think default nDebug is changed in webview.
Code: Select all  Expand view  RUN
// Please install https://developer.microsoft.com/en-us/m ... /webview2/ x86 version before using it

#include "FiveWin.ch"

function Main()

   local oWebView := TWebView():New(1)     <------ HERE

   oWebView:Navigate( "http://www.google.com" )
   oWebView:SetTitle( "Microsoft Edge WebView working from FWH" )
   oWebView:SetSize( 1200, 800 )
   oWebView:SetUserAgent( "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Mobile Safari/537.36" )
   //oWebView:OpenDevToolsWindow()
   sleep( 300 )
   oWebView:Run()
   oWebView:Destroy()

return nil


TWebView():New(1)

I apologize for the inconvenience I have caused.

Thanks.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: how to open devtoolswindow from application.

Postby Antonio Linares » Sat Jul 08, 2023 12:46 pm

Dear Hakan,

Very good finding! :-)

> local oWebView := TWebView():New( 1 ) // shows the "inspect" menu item

thank you
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Marc Venken and 32 guests