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]
Old-style base class for top-level, entry point main objects.
JSApp provides two services to an
object Foo
that extends it. These two services are replaced by two different features, starting with Scala.js 0.6.18.Discoverability by sbt as main object
Since Scala.js 0.6.18, the sbt plugin can recognize "standard"
main
methods of the formin objects, even if they do not extend
JSApp
. Use such a main method to replace JSApp in the context of discoverability by sbt.To enable it as main method, make sure you also set
scalaJSUseMainModuleInitializer := true
in your project settings.
Automatic export to JavaScript
Given
the object
Foo
and itsmain
method are automatically exported such that JavaScript code can callTo achieve exactly the same behavior without JSApp, define
Foo
asAlternatively, you can define it as
but in that case, the JavaScript code will have to be changed to
(Since version 0.6.20) Consult the Scaladoc of js.JSApp for migration tips.