Namespace: SpawnDev.SpawnJS.JSObjects
Source: JSObjects/PipeToOptions.cs
MDN Reference: PipeToOptions on MDN
ReadableStream pipTo options https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeTo#options
| Property | Type | Access | Description |
|---|---|---|---|
PipeToOptions |
class |
get/set | ReadableStream pipTo options https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeTo#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<PipeToOptions>(...)or constructornew PipeToOptions(...)
// Fetch the original image
fetch("png-logo.png")
// Retrieve its body as ReadableStream
.then((response) => response.body)
.then((body) => body.pipeThrough(new PNGTransformStream()))
.then((rs) => rs.pipeTo(new FinalDestinationStream()));(async () => {
// Fetch the original image
const response = await fetch("png-logo.png");
// Retrieve its body as ReadableStream
await response.body
.pipeThrough(new PNGTransformStream())
.pipeTo(new FinalDestinationStream());
})();