trait
JSApp extends AnyRef
Abstract Value Members
-
abstract
def
main(): Unit
Concrete Value Members
-
-
final
def
##(): Int
-
def
+(other: String): String
-
def
->[B](y: B): (JSApp, B)
-
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
-
-
-
-
def
finalize(): Unit
-
def
formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
→[B](y: B): (JSApp, B)
Inherited by implicit conversion any2stringadd from
JSApp to any2stringadd[JSApp]
Inherited by implicit conversion StringFormat from
JSApp to StringFormat[JSApp]
Inherited by implicit conversion Ensuring from
JSApp to Ensuring[JSApp]
Inherited by implicit conversion ArrowAssoc from
JSApp to ArrowAssoc[JSApp]
Base class for top-level, entry point main objects (softly deprecated).
In Scala.js 1.x,
js.JSApp
will disappear. It is currently "softly" deprecated: it is not recommended to use it in new code, but it does not cause a deprecation warning (yet). Prefer using a standard main method (see below).Objects inheriting from JSApp are automatically exported to JavaScript under their fully qualified name, and their main method as well.
JSApp is typically used to mark the entry point of a Scala.js application. As such, the sbt plugin also recognizes top-level objects extending JSApp. It allows to run their main method with
sbt run
, and can also generate a tiny JavaScript launcher snippet executing the main method of one specific JSApp object.Starting with Scala.js 0.6.18, the sbt plugin can also recognize "standard"
main
methods of the formin objects, even if they do not extend
JSApp
. Such main methods are cross-platform, and should be preferred over extendingJSApp
in new code. Note however that: