Namespace: SpawnDev.SpawnJS.JSObjects
Source: JSObjects/PipeThroughOptions.cs
MDN Reference: PipeThroughOptions on MDN
Options for the pipeThrough method of the ReadableStream interface. https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeThrough#options
| Property | Type | Access | Description |
|---|---|---|---|
PipeThroughOptions |
class |
get/set | Options for the pipeThrough method of the ReadableStream interface. https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeThrough#options |
PreventAbort |
bool? |
get/set | |
PreventCancel |
bool? |
get/set | |
Signal |
AbortSignal? |
get |
SpawnDev.SpawnJS Mapping Note: The JavaScript examples below show the standard Web API usage. In SpawnDev.SpawnJS, the same API is available with C# conventions:
- Properties and methods use PascalCase (e.g.,
readyStatebecomesReadyState)- Events use ActionEvent with
+=/-=(e.g.,addEventListener("click", fn)becomesOnClick += handler)- Async methods return
Task<T>instead ofPromise<T>- Objects should be disposed with
usingstatements- Access via
JS.Get<PipeThroughOptions>(...)or constructornew PipeThroughOptions(...)
// Fetch the original image
fetch("png-logo.png")
// Retrieve its body as ReadableStream
.then((response) => response.body)
.then((rs) => logReadableStream("Fetch Response Stream", rs))
// Create a gray-scaled PNG stream out of the original
.then((body) => body.pipeThrough(new PNGTransformStream()))
.then((rs) => logReadableStream("PNG Chunk Stream", rs));