| /* eslint-disable no-undef */ |
| 2 | // quickjs-emscripten code injected into emscripten-module.js |
| 3 | // We use this to expose and patch up issues with Emscripten's source map handling... |
| 4 | function quickjsEmscriptenInit(debugLog) { |
| 5 | const log = debugLog || function () {} |
| 6 | // Everything goes in a function so we can defer running until other variables |
| 7 | // are initialized in case they change. |
| 8 | const extension = { log } |
| 9 | for (const init of quickjsEmscriptenInit.inits) { |
| 10 | init(extension) |
| 11 | } |
| 12 | Module["quickJSEmscriptenExtensions"] = extension |
| 13 | return extension |
| 14 | } |
| 15 | quickjsEmscriptenInit.inits = [] |
| 16 | Module["quickjsEmscriptenInit"] = quickjsEmscriptenInit |
| 17 |