Packages

  • package root
    Definition Classes
    root
  • package scala
    Definition Classes
    root
  • package scalajs
    Definition Classes
    scala
  • package js

    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.

    Guide

    General documentation on Scala.js is available at http://www.scala-js.org/doc/.

    Overview

    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:

    The 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:

    • Boolean is the type of primitive JavaScript booleans
    • Double is the type of primitive JavaScript numbers
    • String is the type of primitive JavaScript strings (or null)
    • Unit is the type of the JavaScript undefined value
    • 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.

    Definition Classes
    scalajs
  • package typedarray

    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

    Definition Classes
    js
  • AB2TA
  • AC2TA
  • AD2TA
  • AF2TA
  • AI2TA
  • AS2TA
  • ArrayBuffer
  • ArrayBufferInputStream
  • ArrayBufferView
  • DataView
  • DataViewExt
  • Float32Array
  • Float64Array
  • Int16Array
  • Int32Array
  • Int8Array
  • TA2AB
  • TA2AC
  • TA2AD
  • TA2AF
  • TA2AI
  • TA2AS
  • TypedArray
  • TypedArrayBuffer
  • TypedArrayBufferOps
  • TypedArrayStatic
  • Uint16Array
  • Uint32Array
  • Uint8Array
  • Uint8ClampedArray

class DataView extends Object with ArrayBufferView

ECMAScript 6 A DataView allows for extraction of particular data types at specific offsets.

Annotations
@JSType() @native() @JSGlobal()
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DataView
  2. ArrayBufferView
  3. Object
  4. Any
  5. AnyRef
  6. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DataView(buffer: ArrayBuffer, byteOffset: Int = 0, byteLength: Int = ???)

Value Members

  1. final def !=(arg0: scala.Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from DataView toany2stringadd[DataView] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (DataView, B)
    Implicit
    This member is added by an implicit conversion from DataView toArrowAssoc[DataView] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: scala.Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. val buffer: ArrayBuffer

    The underlying buffer of this ArrayBufferView

    The underlying buffer of this ArrayBufferView

    Definition Classes
    ArrayBufferView
  8. val byteLength: Int

    The number of bytes of this ArrayBufferView

    The number of bytes of this ArrayBufferView

    Definition Classes
    ArrayBufferView
  9. val byteOffset: Int

    The offset of this ArrayBufferView in the underlying buffer

    The offset of this ArrayBufferView in the underlying buffer

    Definition Classes
    ArrayBufferView
  10. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  11. def ensuring(cond: (DataView) => Boolean, msg: => scala.Any): DataView
    Implicit
    This member is added by an implicit conversion from DataView toEnsuring[DataView] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: (DataView) => Boolean): DataView
    Implicit
    This member is added by an implicit conversion from DataView toEnsuring[DataView] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean, msg: => scala.Any): DataView
    Implicit
    This member is added by an implicit conversion from DataView toEnsuring[DataView] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean): DataView
    Implicit
    This member is added by an implicit conversion from DataView toEnsuring[DataView] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  18. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from DataView toStringFormat[DataView] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def getFloat32(byteOffset: Int, littleEndian: Boolean = false): Float
  21. def getFloat64(byteOffset: Int, littleEndian: Boolean = false): Double
  22. def getInt16(byteOffset: Int, littleEndian: Boolean = false): Short
  23. def getInt32(byteOffset: Int, littleEndian: Boolean = false): Int
  24. def getInt8(byteOffset: Int): Byte
  25. def getUint16(byteOffset: Int, littleEndian: Boolean = false): Int
  26. def getUint32(byteOffset: Int, littleEndian: Boolean = false): Double
  27. def getUint8(byteOffset: Int): Short
  28. def hasOwnProperty(v: String): Boolean

    Tests whether this object has the specified property as a direct property.

    Tests whether this object has the specified property as a direct property.

    Unlike js.Object.hasProperty, this method does not check down the object's prototype chain.

    MDN

    Definition Classes
    Object
  29. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. def isPrototypeOf(v: Object): Boolean

    Tests whether this object is in the prototype chain of another object.

    Tests whether this object is in the prototype chain of another object.

    Definition Classes
    Object
  32. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  35. def propertyIsEnumerable(v: String): Boolean

    Tests whether the specified property in an object can be enumerated by a call to js.Object.properties, with the exception of properties inherited through the prototype chain.

    Tests whether the specified property in an object can be enumerated by a call to js.Object.properties, with the exception of properties inherited through the prototype chain.

    If the object does not have the specified property, this method returns false.

    MDN

    Definition Classes
    Object
  36. def setFloat32(byteOffset: Int, value: Float, littleEndian: Boolean = false): Unit
  37. def setFloat64(byteOffset: Int, value: Double, littleEndian: Boolean = false): Unit
  38. def setInt16(byteOffset: Int, value: Short, littleEndian: Boolean = false): Unit
  39. def setInt32(byteOffset: Int, value: Int, littleEndian: Boolean = false): Unit
  40. def setInt8(byteOffset: Int, value: Byte): Unit
  41. def setUint16(byteOffset: Int, value: Int, littleEndian: Boolean = false): Unit
  42. def setUint32(byteOffset: Int, value: Double, littleEndian: Boolean = false): Unit
  43. def setUint8(byteOffset: Int, value: Short): Unit
  44. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  45. def toLocaleString(): String
    Definition Classes
    Object
  46. def toString(): String
    Definition Classes
    AnyRef → Any
  47. def valueOf(): scala.Any
    Definition Classes
    Object
  48. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  49. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  50. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def [B](y: B): (DataView, B)
    Implicit
    This member is added by an implicit conversion from DataView toArrowAssoc[DataView] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from ArrayBufferView

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from scala.Any

Inherited by implicit conversion any2stringadd fromDataView to any2stringadd[DataView]

Inherited by implicit conversion StringFormat fromDataView to StringFormat[DataView]

Inherited by implicit conversion Ensuring fromDataView to Ensuring[DataView]

Inherited by implicit conversion ArrowAssoc fromDataView to ArrowAssoc[DataView]

Ungrouped