summaryrefslogtreecommitdiff
path: root/ext/web/14_compression.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/web/14_compression.js')
-rw-r--r--ext/web/14_compression.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/ext/web/14_compression.js b/ext/web/14_compression.js
index 1b6dd4964..0563861c2 100644
--- a/ext/web/14_compression.js
+++ b/ext/web/14_compression.js
@@ -9,9 +9,12 @@ const core = globalThis.Deno.core;
const ops = core.ops;
const primordials = globalThis.__bootstrap.primordials;
const {
+ SymbolFor,
+ ObjectPrototypeIsPrototypeOf,
TypedArrayPrototypeGetByteLength,
} = primordials;
import * as webidl from "ext:deno_webidl/00_webidl.js";
+import { createFilteredInspectProxy } from "ext:deno_console/01_console.js";
import { TransformStream } from "ext:deno_web/06_streams.js";
webidl.converters.CompressionFormat = webidl.createEnumConverter(
@@ -60,6 +63,23 @@ class CompressionStream {
webidl.assertBranded(this, CompressionStreamPrototype);
return this.#transform.writable;
}
+
+ [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) {
+ return inspect(
+ createFilteredInspectProxy({
+ object: this,
+ evaluate: ObjectPrototypeIsPrototypeOf(
+ CompressionStreamPrototype,
+ this,
+ ),
+ keys: [
+ "readable",
+ "writable",
+ ],
+ }),
+ inspectOptions,
+ );
+ }
}
webidl.configureInterface(CompressionStream);
@@ -102,6 +122,23 @@ class DecompressionStream {
webidl.assertBranded(this, DecompressionStreamPrototype);
return this.#transform.writable;
}
+
+ [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) {
+ return inspect(
+ createFilteredInspectProxy({
+ object: this,
+ evaluate: ObjectPrototypeIsPrototypeOf(
+ DecompressionStreamPrototype,
+ this,
+ ),
+ keys: [
+ "readable",
+ "writable",
+ ],
+ }),
+ inspectOptions,
+ );
+ }
}
function maybeEnqueue(controller, output) {