From ffb8fecdb57168858d0da9ffb03eb0ee7a40c45c Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Tue, 16 Dec 2025 10:34:56 -0600 Subject: [PATCH] pollyfill for webkit --- src/webpage/utils/pollyfills.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/webpage/utils/pollyfills.ts b/src/webpage/utils/pollyfills.ts index edb9d0f..9f6f51c 100644 --- a/src/webpage/utils/pollyfills.ts +++ b/src/webpage/utils/pollyfills.ts @@ -54,3 +54,12 @@ if ("Iterator" in globalThis) { } else { defineItter("".matchAll(/6/g).constructor as typeof Iterator); } + +ReadableStream.prototype[Symbol.asyncIterator] = async function* () { + const reader = this.getReader(); + while (true) { + const v = await reader.read(); + yield v.value; + if (v.done) return undefined; + } +};