Namespace: SpawnDev.SpawnJS.JSObjects
Source: JSObjects/CountQueuingStrategyOptions.cs
MDN Reference: CountQueuingStrategyOptions on MDN
https://developer.mozilla.org/en-US/docs/Web/API/CountQueuingStrategy/CountQueuingStrategy#options
| Property | Type | Access | Description |
|---|---|---|---|
CountQueuingStrategyOptions |
class |
get | https://developer.mozilla.org/en-US/docs/Web/API/CountQueuingStrategy/CountQueuingStrategy#options |
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<CountQueuingStrategyOptions>(...)or constructornew CountQueuingStrategyOptions(...)
const queuingStrategy = new CountQueuingStrategy({ highWaterMark: 1 });
const writableStream = new WritableStream(
{
// Implement the sink
write(chunk) {
// …
},
close() {
// …
},
abort(err) {
console.log("Sink error:", err);
},
},
queuingStrategy,
);
const size = queuingStrategy.size();