Is there any way to start a browser with arguments and read them with JavaScript.
e.g. something like that: chromium-browser -test=123
dummy-js: var test = browser["test"];
Is there any way to start a browser with arguments and read them with JavaScript.
e.g. something like that: chromium-browser -test=123
dummy-js: var test = browser["test"];
You can start browsers from the command line however as you usually do not need to pass arguments to JS in that way, there is no built in way to do that (directly). However, you can use the URL to pass in some information:
firefox https://example.com?test=123
That can then easily be accessed from within JS.
For any randomly loaded page accessing the launch parameters of the browser - NO. And it shouldn't either.
If you want to get the launch parameters from the startup web page, launch it with ural parameters. They are easily accessible from within JS.
If you want any other web page you are managing to access the launch parameters:
Any other web page which would like to access these params should:
3.1 Contain a hidden iFrame which points to the first local html file
3.2 Have a function in that file to read the localStorage and do postMessage to the parent window.