The biggest project on NW.js? Web Browser! +Great new features for NW.js?

657 views
Skip to first unread message

rucka...@gmail.com

unread,
Mar 3, 2017, 12:58:32 PM3/3/17
to nw.js

We created Web browser based on NW.js project. I consider our project quite mature. It is already few years in development. Without further delay here is version for Win 7 and later:

https://sdn.szn.cz/d_41/c_data_G_F/XrUI.zip


And for Win XP and Vista:

https://sdn.szn.cz/d_41/c_data_H_E/OC9P.zip

MacOS 13 and newer:

https://sdn.szn.cz/d_41/c_data_G_F/GxnK.zip

Older MacOS:

https://sdn.szn.cz/d_41/c_data_G_F/3eYJ.zip

 

Our project has tens of thousands lines of JavaScript code and I think it is full-featured browser which everybody can use as only browser. It is certainly one of the biggest project based on NW.js we’ve seen so far. Our company is very tightly coupled with Czech Republic (https://en.wikipedia.org/wiki/Czech_Republic). We create software only for Czech Republic and we currently have no ambition to expand to another countries hence it is only in Czech language. But although browser is only in Czech language I think it is quite straightforward and comprehensible. We have proper installer but it cannot be used unless you are in Czech Republic since there is not license for proprietary codecs. Of course you shouldn’t use it unless you have your own license for codecs…


Web browser-like projects are probably not primary goal of NW.js but I think NW.js developers can be proud that this kind of projects are possible to create as well. But we wouldn’t be able to achieve this result with “pure” NW.js we need several changes. We try to do as much as possible in JavaScript with help of Node.js but sometimes we find very convenient to change something directly in NW.js (or Chromium if you want) code. Our custom NW.js projects can be found here:

https://github.com/janRucka/chromium.src-1/tree/browser19

https://github.com/janRucka/nw.js/tree/browser19


or here base on nw14 for older systems:

https://github.com/janRucka/chromium.src-1/tree/browser14

https://github.com/janRucka/nw.js/tree/browser14


Some changes are very specific and helpful only for our project but from others could certainly benefit NW.js project as well. In past we created few pull-request but most of them weren’t merged at the end. Also with Chromium fork there is a problem that with any new commit from NW.js dev will create a lot of conflicts (because of NW.js style of rebasing everything into one commit and not merging).

We would like to introduce our changes here and propose to NW.js developers to merge them.


Our Changes in NW.js which we find very useful in general development:

Allow create webview in new process:

https://github.com/janRucka/chromium.src-1/commit/391a99db83b164eef0cd8e35f8ac5a78e846e986


Attribute 'usenewprocess' added on webview. If used it ensure that webview is started in new process. If not used chrome will decide whether or not new process will be used (e.g. if you have different partition ID Chromium always create webview in different process).

Very important feature for us if multiple webviews with heavy load is used it is almost necessity.


Related:

https://github.com/nwjs/nw.js/issues/3911


Flash flickering of console window "echo NOT SANDBOXED" fix:

https://github.com/janRucka/chromium.src-1/commit/e8c374cb2c19c0f76c5d37d73695a573cff48a40


Fix of very annoying issue with flickering of console window with "echo NOT SANDBOXED".


Related:

https://github.com/nwjs/nw.js/issues/5278


Favicon and title events:

https://github.com/janRucka/chromium.src-1/commit/9bd3e48da9ca01ab0648a0eb77f0e6a4e64cce40

https://github.com/janRucka/chromium.src-1/commit/18d49e2e31eb6ba2b15ea13adcf5831c156b69c7


titlechange event and faviconchange event when loading new page.


Related:

https://github.com/nwjs/nw.js/issues/5514


Cookies API on webview:

https://github.com/janRucka/chromium.src-1/commit/dbc007eca1326ff2976de4f92472820315d4d04b


Basically the same as chrome API but this one is working for webview:

https://developer.chrome.com/extensions/cookies


Certificates:

Event for any SSL update:

https://github.com/janRucka/chromium.src-1/commit/812bbba016abbe74f9c88a380bacbb6f3a9d5f37

https://github.com/janRucka/chromium.src-1/commit/97a387ea2de09749317128ceaa6cfb2063ca8ee3


sslchange event on webview invoked when SSL state changed.


Custom certificate error handling (only if attribute set when webview is created):

https://github.com/janRucka/chromium.src-1/commit/c1c86e5bec3dd0ff4a170fcf42108f61f85c08b2

https://github.com/janRucka/chromium.src-1/commit/aaf3bb00eb7a4a5f19a2153c01b25b2dac540e4b


Via onCertificateError event you can handle certificate error in any way you want and you don’t need to show Chrome-like cert error page.


Related:

https://groups.google.com/forum/#!topic/nwjs-general/0youe5RFpa0

https://github.com/nwjs/nw.js/issues/5707

https://github.com/nwjs/nw.js/issues/1922


User-agent fix:

https://github.com/janRucka/chromium.src-1/commit/3db521e0f7f27a9f99510d761f393d460f9e83d8


Sometimes original Chrome-like user agent was send, this is fix of that. Maybe fixed in latest version of NW.js?


Related:

https://github.com/nwjs/nw.js/issues/5397

https://github.com/nwjs/nw.js/issues/4935


Working with history:

https://github.com/janRucka/chromium.src-1/commit/3443051e22857ca400dbf7bb573eda7ce6a51d01

https://github.com/janRucka/chromium.src-1/commit/c90786f5aa8c695ad9077a613f8c58a057c6fbba


On webview: getPagesHistory function, returning array of URLs, titles and favicons of pages in history, getCurrentHistoryIndex function, returning current history index

chrome.history.addUrl - optional title attribute added


Related:

https://github.com/nwjs/nw.js/issues/1507

 



And we have many more changes but not all can be considered as suitable for NW.js because some of them are very specific such as setting default browser, getting bookmarks from other browsers via Chromium code or our branding of NW.js. Some of them can even seem to be incomplete (although fine for our purpose) or changing behavior.

 

If any of this can be solved without custom changes in better way, we would appreciate any advice. Also some issues which we try to solve could be resolved in meantime and not be actual anymore – we don’t test them repeatedly.

 

In past we tried several times to have some of our changes merged back into NW.js project but without much of a success as you can see e.g. here:

https://github.com/nwjs/chromium.src/pull/2

https://github.com/nwjs/chromium.src/pull/12

https://github.com/nwjs/chromium.src/pull/13


or here:

https://github.com/nwjs/chromium.src/pull/25

https://github.com/nwjs/nw.js/issues/4935


There is a lot of conflict, but believe us that there weren’t any in time of creation. We give up on keeping them without conflict some time ago. It is quite demotivating if you try to merge something without reaction for more than half a year. We understand NW.js developers are probably extremely busy with other work on NW.js project but if you want to have more pull-request we need to see that something is happening.

Since we would really appreciate merge of our changes to NW.js project we created several new pull requests today (for older see above). Hopefully it will make NW.js project even better and make our life easier since we wouldn’t have to merge too many changes with every new version of NW.js.

 

https://github.com/nwjs/chromium.src/pull/67

https://github.com/nwjs/chromium.src/pull/68

https://github.com/nwjs/chromium.src/pull/69

 

We can create pull-requests into actual version (20 or rather 21?) if you (NW.js devs) want or resolve conflict in older ones. We are willing to do some extra work if needed in order to merge our pull requests. But we don’t want to do any extra effort if there is not a good change to have our pull requests merged.


 

NW.js is great project, please keep doing it even better. It allows us – beside others - to create our humble project.

Roger Wang

unread,
Mar 3, 2017, 6:29:11 PM3/3/17
to nw.js, rucka...@gmail.com
Glad to see your product. It's very cool. Supporting browser application is one of the ultimate goals of NW, as browsers test various aspects of the NW codebase. Will look to review and merge your patches.

Regards,
Roger

Ralf Schwöbel

unread,
Mar 4, 2017, 12:34:48 PM3/4/17
to nw.js, rucka...@gmail.com
Since I have tried at least to provide basic browsing features for my proxy browser PersonaTool.com (via which I will be in Czech Republic, when I test your stuff :-), I can tell how much work it is to create a decent browser... popups, plugins, history, cookies, localstorage, webrtc, etc. are all heavily underestimated bits and pieces of a modern browser and Chromium is at least taking care of a lot already... still, I think you might have done not just a few thousand, rather 10+ thousands lines of code.. I will check it out!

jonath...@gmail.com

unread,
Mar 4, 2017, 11:00:43 PM3/4/17
to nw.js, rucka...@gmail.com
BRAVO !!!

I unzipped your download and it works perfectly. I tested with NW 14.7, NW 20.3, NW 20.4, and NW 21.0 within 5 minutes and it runs without flaws (as far as I could see) in each NW version.

Just for fun, I went to the www.css3.test.com and www.html5test.com sites, and your browser received scores considerably higher than Microsoft's IE 11 and Edge 14 browsers. (Chrome browser scores a little higher, as might be expected).  Anyway, your NW.js browser project is amazing.

I will now spend  time looking through the files!!

Thank you for letting us all see your efforts to date.



rucka...@gmail.com

unread,
Mar 6, 2017, 4:26:24 AM3/6/17
to nw.js, rucka...@gmail.com, jonath...@gmail.com

Although it is possible to run our browser in "pure" NWjs (without our changes) I don’t recommend it since not everything will work as expected.

Reply all
Reply to author
Forward
0 new messages