Flavour or TeaVM main() Arguments
The Goal
When launching a Flavour application, you may want to provide arguments to it.
The Mechanism
Provide the arguments to main() as an array:
<body onload="main(['arg1', 'arg2'])">
What can go Wrong
Note that if you accidentally pass a single string instead of an array, each character from the string will be passed as a separate argument.
Last modified on 1 Dec 2026 by AO
Copyright © 2026 Andrew Oliver