trait ReadableStreamUnderlyingSource[T] extends Object
See ¶4.2.3. The underlying source API of whatwg streams spec.
- T
Type of the Chunks returned by the Stream
- Annotations
- @JSType()
- Alphabetic
- By Inheritance
- ReadableStreamUnderlyingSource
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val autoAllocateChunkSize: UndefOr[Int]
(byte streams only)
(byte streams only)
Can be set to a positive integer to cause the implementation to automatically allocate buffers for the underlying source code to write into.
- Annotations
- @JSOptional()
- val cancel: UndefOr[Function1[Any, UndefOr[Promise[Unit]]]]
A function that is called whenever the consumer cancels the stream, via ReadableStream.cancel or ReadableStreamReader.cancel():scala\.scalajs\.js\.Promise[Unit]*.
A function that is called whenever the consumer cancels the stream, via ReadableStream.cancel or ReadableStreamReader.cancel():scala\.scalajs\.js\.Promise[Unit]*. It takes as its argument the same value as was passed to those methods by the consumer. If the shutdown process is asynchronous, it can return a promise to signal success or failure; the result will be communicated via the return value of the cancel method that was called. Additionally, a rejected promise will error the stream, instead of letting it close. Throwing an exception is treated the same as returning a rejected promise.
- Annotations
- @JSOptional()
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- 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()
- def propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- val pull: UndefOr[Function1[ReadableStreamController[T], UndefOr[Promise[Unit]]]]
A function that is called whenever the stream’s internal queue of chunks becomes not full, i.e.
A function that is called whenever the stream’s internal queue of chunks becomes not full, i.e. whenever the queue’s desired size becomes positive. Generally, it will be called repeatedly until the queue reaches its high water mark (i.e. until the desired size becomes non-positive).
This function will not be called until start successfully completes. Additionally, it will only be called repeatedly if it enqueues at least one chunk or fulfills a BYOB request; a no-op pull implementation will not be continually called.
If the function returns a promise, then it will not be called again until that promise fulfills. (If the promise rejects, the stream will become errored.) This is mainly used in the case of pull sources, where the promise returned represents the process of acquiring a new chunk. Throwing an exception is treated the same as returning a rejected promise.
- Annotations
- @JSOptional()
- val start: UndefOr[Function1[ReadableStreamController[T], UndefOr[Promise[Unit]]]]
A function that is called immediately during creation of the ReadableStream.
A function that is called immediately during creation of the ReadableStream.
If this setup process is asynchronous, it can return a promise to signal success or failure; a rejected promise will error the stream. Any thrown exceptions will be re-thrown by the ReadableStream constructor.
- Annotations
- @JSOptional()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toLocaleString(): String
- Definition Classes
- Object
- def toString(): String
- Definition Classes
- AnyRef → Any
- val type: UndefOr[ReadableStreamType]
Can be set to "bytes" to signal that the constructed ReadableStream is a readable byte stream.
Can be set to "bytes" to signal that the constructed ReadableStream is a readable byte stream.
Setting any value other than "bytes" or undefined will cause the ReadableStream() constructor to throw an exception.
- Annotations
- @JSOptional()
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()