[Gambas-user] WebView html source code?

Bruce Steers bsteers4 at gmail.com
Sat Jul 23 10:58:26 CEST 2022


On Sat, 23 Jul 2022 at 09:39, Benoit Minisini <
benoit.minisini at gambas-basic.org> wrote:

> Le 23/07/2022 à 05:21, Bruce Steers a écrit :
> >
> >
> > On Fri, 22 Jul 2022 at 18:49, Benoit Minisini
> > <benoit.minisini at gambas-basic.org
> > <mailto:benoit.minisini at gambas-basic.org>> wrote:
> >
> >     Le 22/07/2022 à 18:25, Bruce Steers a écrit :
> >      > Would it take much for a new WebView method or property to get the
> >      > source code?
> >      >
> >      > a Method like
> >      > WebView1.GetSource() As String
> >      > or
> >      > WebView1.GetHtml() As String
> >      >
> >      > ora read property (or even read/write)
> >      > sSource = WebView1.Source
> >      > or
> >      > sSource = WebView1.Html
> >      >
> >      >
> >      > I really want to add an option to my gambas debug browser to read
> >     the
> >      > source.
> >      > Much respect
> >      > BruceS
> >      >
> >
> >     Alas, AFAIK, this is not supported by WebKitGTK.
> >
> >     Regards,
> >
> >
> > I have a working attempt, but it's awful the way i'm getting the path to
> > the temporary cgi. :(
> >
> https://gitlab.com/bsteers4/gambas/-/commit/0562c13d95a3bdc2684a4397cc17a30277e25b7f
> > <
> https://gitlab.com/bsteers4/gambas/-/commit/0562c13d95a3bdc2684a4397cc17a30277e25b7f
> >
> >
> > Im listing the dirs in temp folders session/gb.web.gui and getting the
> > latest LastModified one.
> > Couldn't find a way to get the path to the temp exe?
> >
> > Once I have the path i just execute the exe and get the process output.
> >
> > Currently got it set to hit F12 to get the viewer (with a nice
> > TextEditor for html highlighting)
> >
> > Clip
> > http://bws.org.uk/img/screenrecord-2022-07-23_04.13.24.mp4
> > <http://bws.org.uk/img/screenrecord-2022-07-23_04.13.24.mp4>
> >
> > Respects
> > BruceS
> >
>
> Can't you simply explain what you want to do?
>
> If you need to debug the client side of your application, you have to
> use an external browser at the moment, as the WebView control does not
> give access to the Chromium developer tools yet.
>

I disagree.  Clearly i can now view the page source using the internal
browser  ;)

I want to be able to view the source of the app i'm debugging in the
internal browser because it helps when debugging.
Yes firefox has many great options to debug unlike the internal browser
that is the most simplest a viewer can be but if i just want to inspect the
source quickly it'd be good for some possibility
Often firefox is already running in the background so i then have to close
all my windows to debug with firefox.
plus with internal browser it's faster and i don't get repeatedly asked for
a profile even though i select "dont ask next time"

Another option would be to add something like "print to stdout" as an
option of the list of browsers to use. then the combobox on the designer
used to change browser could be used to temporarily disable it but keep the
combobox visible.

BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220723/2856e941/attachment.htm>


More information about the User mailing list