class JSGlobal extends Annotation with StaticAnnotation
Marks the annotated class or object as being a member of the JavaScript global scope.
The annotated class/object must also be annotated with @js.native
, and
therefore extend js.Any.
Given:
@js.native @JSGlobal class Foo extends js.Object @js.native @JSGlobal("Foobar") object Bar extends js.Object @js.native @JSGlobal("Lib.Babar") class Babar extends js.Object
The following mappings apply (global
denotes the global scope):
Scala.js | JavaScript ------------------------+------------------ new Foo() | new global.Foo() Bar | global.Foobar js.constructorOf[Babar] | global.Lib.Babar
- See also
- Alphabetic
- By Inheritance
- JSGlobal
- StaticAnnotation
- Annotation
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: scala.Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (JSGlobal, B)
-
final
def
==(arg0: scala.Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def ensuring(cond: (JSGlobal) ⇒ Boolean, msg: ⇒ scala.Any): JSGlobal
- def ensuring(cond: (JSGlobal) ⇒ Boolean): JSGlobal
- def ensuring(cond: Boolean, msg: ⇒ scala.Any): JSGlobal
- def ensuring(cond: Boolean): JSGlobal
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: scala.Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def →[B](y: B): (JSGlobal, B)