package wasm
- Alphabetic
- Public
- All
Types, methods and values for interoperability with JavaScript libraries.
Types, methods and values for interoperability with JavaScript libraries.
This package is only relevant to the Scala.js compiler, and should not be referenced by any project compiled to the JVM.
General documentation on Scala.js is available at http://www.scala-js.org/doc/.
The trait js.Any is the root of the hierarchy of JavaScript types. This package defines important subtypes of js.Any that are defined in the standard library of ECMAScript 5.1 (or ES 6, with a label in the documentation), such as js.Object, js.Array and js.RegExp.
Implicit conversions to and from standard Scala types to their equivalent in JavaScript are provided. For example, from Scala functions to JavaScript functions and back.
The most important subtypes of js.Any declared in this package are:
this
as an explicit parameterThe trait js.Dynamic is a special subtrait of js.Any. It can represent any JavaScript value in a dynamically-typed way. It is possible to call any method and read and write any field of a value of type js.Dynamic.
There are no explicit definitions for JavaScript primitive types, as one could expect, because the corresponding Scala types stand in their stead:
null
)Null
is the type of the JavaScript null value js.UndefOr gives a scala.Option-like interface where the
JavaScript value undefined
takes the role of None
.
A | B is an unboxed pseudo-union type, suitable to type values that admit several unrelated types in facade types.
Non-Standard Non-standard, although often supported methods to schedule asynchronous execution.
Non-Standard Non-standard, although often supported methods to schedule asynchronous execution.
The methods in this package are not supported in all JavaScript environments. Each relies on the global JavaScript function with the same name.
The corresponding methods are not standard in ECMAScript. Different JavaScript environments support all, some or none of them.
Browsers support all those methods as part the of the DOM standard.
ECMAScript 6 The typdearray package provides facade types for JavaScript ArrayBuffer, TypeArrays and DataView.
ECMAScript 6 The typdearray package provides facade types for JavaScript ArrayBuffer, TypeArrays and DataView. Further, it provides conversions between primitive Scala arrays and TypedArrays