@@ -291,6 +291,9 @@ if (global.gc) {
291291 knownGlobals . push ( global . gc ) ;
292292}
293293
294+ if ( global . Performance ) {
295+ knownGlobals . push ( global . Performance ) ;
296+ }
294297if ( global . performance ) {
295298 knownGlobals . push ( global . performance ) ;
296299}
@@ -301,16 +304,16 @@ if (global.PerformanceMeasure) {
301304 knownGlobals . push ( global . PerformanceMeasure ) ;
302305}
303306
304- if ( global . fetch ) {
305- knownGlobals . push (
306- global . fetch ,
307- global . FormData ,
308- global . Request ,
309- global . Response ,
310- global . Headers ,
311- ) ;
307+ // TODO(@ethan-arrowood): Similar to previous checks, this can be temporary
308+ // until v16.x is EOL. Once all supported versions have structuredClone we
309+ // can add this to the list above instead.
310+ if ( global . structuredClone ) {
311+ knownGlobals . push ( global . structuredClone ) ;
312312}
313313
314+ if ( global . fetch ) {
315+ knownGlobals . push ( fetch ) ;
316+ }
314317if ( hasCrypto && global . crypto ) {
315318 knownGlobals . push ( global . crypto ) ;
316319 knownGlobals . push ( global . Crypto ) ;
@@ -320,6 +323,27 @@ if (hasCrypto && global.crypto) {
320323if ( global . CustomEvent ) {
321324 knownGlobals . push ( global . CustomEvent ) ;
322325}
326+ if ( global . ReadableStream ) {
327+ knownGlobals . push (
328+ global . ReadableStream ,
329+ global . ReadableStreamDefaultReader ,
330+ global . ReadableStreamBYOBReader ,
331+ global . ReadableStreamBYOBRequest ,
332+ global . ReadableByteStreamController ,
333+ global . ReadableStreamDefaultController ,
334+ global . TransformStream ,
335+ global . TransformStreamDefaultController ,
336+ global . WritableStream ,
337+ global . WritableStreamDefaultWriter ,
338+ global . WritableStreamDefaultController ,
339+ global . ByteLengthQueuingStrategy ,
340+ global . CountQueuingStrategy ,
341+ global . TextEncoderStream ,
342+ global . TextDecoderStream ,
343+ global . CompressionStream ,
344+ global . DecompressionStream ,
345+ ) ;
346+ }
323347
324348function allowGlobals ( ...allowlist ) {
325349 knownGlobals = knownGlobals . concat ( allowlist ) ;
0 commit comments