summaryrefslogtreecommitdiff
path: root/examples/scala-js/library/src/main/scala/scala/scalajs/js/typedarray/ArrayBuffer.scala
blob: b8b8160c5f8673e67a624430ef1841db7496a872 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package scala.scalajs.js.typedarray

import scala.scalajs.js

class ArrayBuffer(length: Int) extends js.Object {

  /** Length of this buffer in bytes */
  val byteLength: Int = js.native

  /** Returns a copy of the given slice of this array buffer */
  def slice(begin: Int, end: Int = ???): ArrayBuffer = js.native

  // Note: Some specifications specify a static isView method on ArrayBuffer
  // that checks whether a given object is an ArrayBufferView. We omit it here
  // since neither Node.js nor PhantomJS support it at the time of writing.

}