summaryrefslogtreecommitdiff
path: root/js/src/jsapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jsapi.h')
-rw-r--r--js/src/jsapi.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/js/src/jsapi.h b/js/src/jsapi.h
index f8203ee1fd..7d151fdb10 100644
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -4386,18 +4386,27 @@ ModuleEvaluate(JSContext* cx, JS::HandleObject moduleRecord);
* Get a list of the module specifiers used by a source text module
* record to request importation of modules.
*
- * The result is a JavaScript array of string values. To extract the individual
- * values use only JS_GetArrayLength and JS_GetElement with indices 0 to
- * length - 1.
+ * The result is a JavaScript array of object values. To extract the individual
+ * values use only JS_GetArrayLength and JS_GetElement with indices 0 to length
+ * - 1.
+ *
+ * The element values are objects with the following properties:
+ * - moduleSpecifier: the module specifier string
+ * - lineNumber: the line number of the import in the source text
+ * - columnNumber: the column number of the import in the source text
+ *
+ * These property values can be extracted with GetRequestedModuleSpecifier() and
+ * GetRequestedModuleSourcePos()
*/
extern JS_PUBLIC_API(JSObject*)
GetRequestedModules(JSContext* cx, JS::HandleObject moduleRecord);
-/*
- * Get the script associated with a module.
- */
-extern JS_PUBLIC_API(JSScript*)
-GetModuleScript(JSContext* cx, JS::HandleObject moduleRecord);
+extern JS_PUBLIC_API(JSString*)
+GetRequestedModuleSpecifier(JSContext* cx, JS::HandleValue requestedModuleObject);
+
+extern JS_PUBLIC_API(void)
+GetRequestedModuleSourcePos(JSContext* cx, JS::HandleValue requestedModuleObject,
+ uint32_t* lineNumber, uint32_t* columnNumber);
} /* namespace JS */