HTMLViewer: Launch HTMLViewer with Chromium flags?

Hi all,

Is it possible to launch the HTMLViewer with Chromium flags, in order to activate useful options? With a plugin maybe?

Run Chromium with flags:
https://www.chromium.org/developers/how-tos/run-chromium-with-flags

The flags:
https://peter.sh/experiments/chromium-command-line-switches/

Well, I don’t see such flags in Chromium API.

cef_settings_t has a flag ignore_certificate_errors which may help to enable something for you?

As those CefSettings are passed in to initialization, it’s too late for the plugin to catch this.

ok, thank you Christian.

Oliver made a feedback case for this: <https://xojo.com/issue/52987>

So basically turn Xojo into Electron? Using HTMLViewer in your app to work around some roadblock should be a last ditch effort, and all too often I’m seeing HTMLViewer abuse.

That’s because something works better with web technologies…

I try to enable remote debugging with HTMLviewer… could not find anything.
There may be some reasons HTMLviewer is not evolved:

  • CSS/web components are far better than Xojo control (look at ag-grid)
  • PWA (Android!) is (or is not?) seen as concurrent
    I wonder how many Xojo developers are also JavaScript developers… 90%?

Ok, back to my problem: any chance to enable chromium remote debugging for HTMLviewer (WebKit) some day? Or even developer tools? CEF 3 of course…

I could develop with chrome itself and put it then in Xojo and it should run; a little risk remains here I guess.

At the moment I let electron (chromeless possible here) use websocket to talk with Xojo which talks to database and file system.
And yes, the node.js crap in electron is not very helpful.
That’s why I would like everything be embedded completely in Xojo and use websocket inside.

When I get Aloe XWS set up and can get there SSL to work, I could use PWA (which works only chromeless with https).
But even with PWA I have still to use two programs.

Any ideas and help really apreciated!!!
Thanks lot in advance!
Regards.

[quote=457462:@Hans-Norbert Gratzal]I could develop with chrome itself and put it then in Xojo and it should run; a little risk remains here I guess.
[/quote]

I do something similar: my javasript / HTML / css is perfectly standalone and works fine in both Safari and IE11, so I can use the built-in debugging features of both, which are pretty good. (Obviously, if you are using Chromium then you’d want to use Chrome instead).

Some things can’t be tested in isolation, so when running in Xojo I use the WKWebviewControlMBS (getting the newer WebKit 2 engine) and set WKWebViewControlMBS.developerExtrasEnabled =true, which allows you to right-click and get the normal Safari debugger window.

Nice tipp! Thanks a lot!!!

What I further tried is me.HTMLviewer1.loadURL("“chrome://settings”) which gave me the following:

CEF 3.3359.1774.gd49d25f Chromium 66.0.3359.181 OS Windows WebKit 537.36 (@164c37e3f235134c88e80fac2a182cfba3f07f00) JavaScript 6.6.346.32 Flash User Agent Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36 Command Line "C:\\Temp\\DebugTest\\DebugTest.exe" --browser-subprocess-path="C:\\Temp\\DebugTest\\DebugTest Libs\\cefsubproc.exe" --no-sandbox --lang=en-US --log-file="C:\\Temp\\DebugTest\\debug.log" --log-severity=disable Module Path C:\\Temp\\DebugTest\\DebugTest Libs\\libcef.dll Cache Path C:\\Users\\Hanno\\AppData\\Roaming\\CEFCache

The commandline is interesting:

--browser-subprocess-path="C:\\Temp\\DebugTest\\DebugTest Libs\\cefsubproc.exe"

Ok, but now I see, putting a switch after this sub strings shall not work.

What I was about to ask was how to change the commandline for the debugging; but seems not the best solution.
Or, I could put cefsubproc.exe in a batch file and add commandline there…

Anyway, I am curious about the switches for the debug switches; are they commented somewhere?

Oh dear, Aloe XWS also waits for being implemented; no boring weekend coming up…:wink:

me.HTMLViewer1.LoadURL("chrome://webui-hosts")

This one shows what further chrome:// settings are possible.
No remote debugging flag to find but for service workers…

Last try was to use a cef.cfg file and copy it into debug folder before starting htmlviewer window.
It includes: chrome:remote-debugging-port = 9222

Sad, did not work…

Ok, to finally complete this:
Michael, I will simply use still chrome standalone as You proposed and use htmlviewer in live app.
Should work as I only use websocket to connect to outside world (or inside Xojo;-)

Maybe someone has another idea…

One thing: 2019r2 runs fast and is great!