diff --git a/doc/api/webstreams.md b/doc/api/webstreams.md index 0c7ac530d21efa..9aadd9ebedb31d 100644 --- a/doc/api/webstreams.md +++ b/doc/api/webstreams.md @@ -1219,13 +1219,13 @@ changes: description: This class is now exposed on the global object. --> -#### `new ByteLengthQueuingStrategy(options)` +#### `new ByteLengthQueuingStrategy(init)` -* `options` {Object} +* `init` {Object} * `highWaterMark` {number} #### `byteLengthQueuingStrategy.highWaterMark` @@ -1256,13 +1256,13 @@ changes: description: This class is now exposed on the global object. --> -#### `new CountQueuingStrategy(options)` +#### `new CountQueuingStrategy(init)` -* `options` {Object} +* `init` {Object} * `highWaterMark` {number} #### `countQueuingStrategy.highWaterMark` diff --git a/lib/internal/webstreams/queuingstrategies.js b/lib/internal/webstreams/queuingstrategies.js index 8fbc87642ebc0c..cb2adefdacaee9 100644 --- a/lib/internal/webstreams/queuingstrategies.js +++ b/lib/internal/webstreams/queuingstrategies.js @@ -69,7 +69,7 @@ class ByteLengthQueuingStrategy { constructor(init) { validateObject(init, 'init'); if (init.highWaterMark === undefined) - throw new ERR_MISSING_OPTION('options.highWaterMark'); + throw new ERR_MISSING_OPTION('init.highWaterMark'); // The highWaterMark value is not checked until the strategy // is actually used, per the spec. @@ -121,7 +121,7 @@ class CountQueuingStrategy { constructor(init) { validateObject(init, 'init'); if (init.highWaterMark === undefined) - throw new ERR_MISSING_OPTION('options.highWaterMark'); + throw new ERR_MISSING_OPTION('init.highWaterMark'); // The highWaterMark value is not checked until the strategy // is actually used, per the spec.