MCPcopy Create free account
hub / github.com/GoogleChrome/samples / missingGlobal

Function missingGlobal

mkbitmap/mkbitmap.js:965–975  ·  view source on GitHub ↗
(sym, msg)

Source from the content-addressed store, hash-verified

963}
964
965function missingGlobal(sym, msg) {
966 if (typeof globalThis !== 'undefined') {
967 Object.defineProperty(globalThis, sym, {
968 configurable: true,
969 get: function() {
970 warnOnce('`' + sym + '` is not longer defined by emscripten. ' + msg);
971 return undefined;
972 }
973 });
974 }
975}
976
977missingGlobal('buffer', 'Please use HEAP8.buffer or wasmMemory.buffer');
978

Callers 1

mkbitmap.jsFile · 0.85

Calls 1

warnOnceFunction · 0.70

Tested by

no test coverage detected