diff --git a/src/pyodide/BUILD.bazel b/src/pyodide/BUILD.bazel index aa0695d5526..27007613677 100644 --- a/src/pyodide/BUILD.bazel +++ b/src/pyodide/BUILD.bazel @@ -94,6 +94,13 @@ const location = undefined; function addEventListener(){} function reportUndefinedSymbolsNoOp() {} + +if (typeof FinalizationRegistry === "undefined") { + globalThis.FinalizationRegistry = class FinalizationRegistry { + register(){} + unregister(){} + }; +} """ REPLACEMENTS = [