When linking a Scala.js application, a sequence of ModuleInitializers can
be given. Those module initializers will be executed at the startup of the
application. More specifically, the top-level code of the relevant
ECMAScript 2015 module emitted will invoke the specified module
initializers in the specified order, after having initialized everything
else (notably static initializers).
A module initializer for a Scala.js application.
When linking a Scala.js application, a sequence of
ModuleInitializer
s can be given. Those module initializers will be executed at the startup of the application. More specifically, the top-level code of the relevant ECMAScript 2015 module emitted will invoke the specified module initializers in the specified order, after having initialized everything else (notably static initializers).Instances of
ModuleInitializer
can be created with methods of the ModuleInitializer companion object.The module in which a
ModuleInitializer
is going to be placed can be adjusted using withModuleID.