Majing a new web browser

Greetings,

For some personal reasons (increase education, increase personal control over web activity, decrease dependence on ‘foreign’ technology providers, and etc), I am making a new web browser using wxpython and html2.webkit/webview. The latter confusion is due to my working on Arch Linux on the OpenBox desktop :slight_smile:

I’ve got a bit of experience working with python and similar, and between experience and the good work of the wxPython devs I have not required much in the way of help. With anything really :slight_smile: Thanks for the great work :smiley:

But, we all come to that point sooner or later.

I have the web browser based on the example html2 code, which is not an horrible bit of code as is; but I wanted better management of history, some light property inspection capability, bookmarking, and maybe a bit of application decoration support through graphic themeing :slight_smile: so I have been modifying the code, albeit very slightly.

I encountered some inconsistencies, and thought ‘well now you’ve done it, barely touched these bits of code and now this’, but when I went back to the original example I find it does the same things, to wit:

some links will not open whjen clicked. I first noticed it happening on search results from startpage.com. Later, it was the articles at news.google.com (although google search return links behave as expected).

These unclickable links behave just as others do except they dont load when clicked: hover activity is proper, and copying the link usin g the context menu produces a pasteable link in the clipboard that looks and works fine when pasted into the browser’s combobox.

That whole bit ‘feels’ like an event is being trapped somehow and not making it as far down the event foodchain as it needs to go.

Additionally, I have embarked on providing some inspoection capabilty by binding some GetSource code to a KEY_DOWN sort of event, per the instructions.

This seems to work intermittently according to a pattern I’m only beginning to see take shape; it’s as if this will only retrieve the html source on pages who’s URLs have made it into the widget’s history.

The code is a complete app of course, is a bit awkward to post, but I’ll do so on request; I don’t feel it especially neccessary at present. I don’t have mysterious runtime errors or crashes, and the code works well with the exception of these fairly clear cases and no doubt some other similar cases I’ve yet to encounter. They generate no errors or warnings, they just don’t do all the things.

Might anyone have any insights?

Thanks in advance,

James

Are you getting a EVT_WEBVIEW_NEWWINDOW event for those links? If so then that means the page wants you to make a new browser instance (in a new tab or frame or whatever) for displaying the linked-to page.

···

On Monday, June 3, 2019 at 7:55:40 AM UTC-7, dangol James wrote:

some links will not open whjen clicked. I first noticed it happening on search results from startpage.com. Later, it was the articles at news.google.com (although google search return links behave as expected).

These unclickable links behave just as others do except they dont load when clicked: hover activity is proper, and copying the link usin g the context menu produces a pasteable link in the clipboard that looks and works fine when pasted into the browser’s combobox.

Robin

AHHH! No, well, I don’t know, maybe?

Heh. I didn’t suspect it might be happening, so didn’t think to look out for it, but the suggestion makes perfect sense. I’ll try it out on a different browser and also see about putting together a changeset to look for that event.

Thanks for the suggestion! I’d almost bet this is the thing. I’ll let you know how it works out.

Cheers

James

···

ॐ♲
:heart:
:wheel_of_dharma::peace_symbol:
:yin_yang:☰☶:yin_yang::peace_symbol:
:wheel_of_dharma:
:heart:
♲ॐ

dangol James wrote:

For some personal reasons (increase education, increase personal control over web activity, decrease dependence on 'foreign' technology providers, and etc), I am making a new web browser using wxpython and html2.webkit/webview.

I don't mean to squash your creative tendencies, but you need to realize that html2.webkit is 99% of a web browser already. In Windows, for example, html2.webkit actually is Internet Explorer. You have IE's interpretations, IE's rendering, and IE's JavaScript interpreter. When you run the Internet Explorer app, it's just an empty window with the Trident engine driving it, and that's exactly what your app will be.

What I'm trying to point out is that there's no way to wrestle control away from the engine. You'll still be relying on outside technology providers.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.