MCPcopy Create free account
hub / github.com/GNOME/gjs / moduleLoadHook

Method moduleLoadHook

modules/internal/loader.js:195–199  ·  view source on GitHub ↗

* Overrides InternalModuleLoader.moduleLoadHook * * @param {string} id - the module specifier * @param {string} uri - the URI where the module is to be found * @returns {Module}

(id, uri)

Source from the content-addressed store, hash-verified

193 * @returns {Module}
194 */
195 moduleLoadHook(id, uri) {
196 const text = this.loadURI(parseURI(uri));
197 this.populateSourceMap(text, uri);
198 return super.moduleLoadHook(id, uri);
199 }
200
201 /**
202 * Resolves a module import with optional handling for relative imports asynchronously.

Callers

nothing calls this directly

Calls 3

loadURIMethod · 0.95
populateSourceMapMethod · 0.95
moduleLoadHookMethod · 0.65

Tested by

no test coverage detected