"Fossies" - the Fresh Open Source Software Archive

Member "scala-js-1.0.0-RC1/library/src/main/scala/scala/scalajs/js/typedarray/ArrayBuffer.scala" (21 Nov 2019, 1035 Bytes) of package /linux/www/scala-js-1.0.0-RC1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Scala source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /*
    2  * Scala.js (https://www.scala-js.org/)
    3  *
    4  * Copyright EPFL.
    5  *
    6  * Licensed under Apache License 2.0
    7  * (https://www.apache.org/licenses/LICENSE-2.0).
    8  *
    9  * See the NOTICE file distributed with this work for
   10  * additional information regarding copyright ownership.
   11  */
   12 
   13 package scala.scalajs.js.typedarray
   14 
   15 import scala.scalajs.js
   16 import scala.scalajs.js.annotation._
   17 
   18 /** <span class="badge badge-ecma6" style="float: right;">ECMAScript 6</span>
   19  *  An ArrayBuffer is a block of contiguous, non-resizable memory.
   20  */
   21 @js.native
   22 @JSGlobal
   23 class ArrayBuffer(length: Int) extends js.Object {
   24 
   25   /** Length of this buffer in bytes */
   26   val byteLength: Int = js.native
   27 
   28   /** Returns a copy of the given slice of this array buffer */
   29   def slice(begin: Int, end: Int = ???): ArrayBuffer = js.native
   30 
   31   // Note: Some specifications specify a static isView method on ArrayBuffer
   32   // that checks whether a given object is an ArrayBufferView. We omit it here
   33   // since neither Node.js nor PhantomJS support it at the time of writing.
   34 
   35 }