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

Method moduleResolveHook

modules/internal/internalLoader.js:172–176  ·  view source on GitHub ↗

* Called by SpiderMonkey as part of gjs_module_resolve(). * * @param {ModulePrivate | null} importingModulePriv - the private object of * the module initiating the import, null if the import is not coming from * a file that can resolve relative imports * @param {string}

(importingModulePriv, specifier)

Source from the content-addressed store, hash-verified

170 * @returns {Module}
171 */
172 moduleResolveHook(importingModulePriv, specifier) {
173 const importingModuleURI = importingModulePriv ? parseURI(importingModulePriv.uri) : null;
174 const [resolved] = this.resolveModule(specifier, importingModuleURI);
175 return resolved;
176 }
177
178 /**
179 * Called by SpiderMonkey as part of gjs_module_load().

Callers

nothing calls this directly

Calls 1

resolveModuleMethod · 0.95

Tested by

no test coverage detected