Table of Contents

Class WritableStreamDefaultController

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The WritableStreamDefaultController interface of the Streams API represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate.

[Value("WritableStreamDefaultController")]
public class WritableStreamDefaultController
Inheritance
WritableStreamDefaultController
Inherited Members

Remarks

Constructors

WritableStreamDefaultController()

public WritableStreamDefaultController()

Properties

Signal

The read-only signal property of the WritableStreamDefaultController interface returns the AbortSignal associated with the controller.

[Value("signal")]
public AbortSignal Signal { get; }

Property Value

AbortSignal

An AbortSignal object.

Remarks

Methods

Error(dynamic)

The error() method of the
WritableStreamDefaultController interface causes any future interactions
with the associated stream to error.

[Value("error")]
public GlobalObject.Undefined Error(dynamic e = null)

Parameters

e dynamic

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

This method is rarely used, since usually it suffices to return a rejected promise from
one of the underlying sink's methods. However, it can be useful for suddenly shutting
down a stream in response to an event outside the normal lifecycle of interactions with
the underlying sink.

See also on MDN