* Called by SpiderMonkey as part of gjs_module_load(). * * @param {string} id - the module specifier * @param {string} uri - the URI where the module is to be found * @returns {Module}
(id, uri)
| 183 | * @returns {Module} |
| 184 | */ |
| 185 | moduleLoadHook(id, uri) { |
| 186 | const priv = new ModulePrivate(id, uri); |
| 187 | |
| 188 | const text = this.loadURI(parseURI(uri)); |
| 189 | const compiled = this.compileModule(priv, text); |
| 190 | |
| 191 | const registry = getRegistry(this.global); |
| 192 | registry.set(id, compiled); |
| 193 | |
| 194 | return compiled; |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | export const internalModuleLoader = new InternalModuleLoader(globalThis, compileInternalModule); |
nothing calls this directly
no test coverage detected