diff options
author | Evan Welsh <contact@evanwelsh.com> | 2022-05-08 15:06:06 -0700 |
---|---|---|
committer | Evan Welsh <contact@evanwelsh.com> | 2022-05-08 15:06:06 -0700 |
commit | a06e890b8d06f019b49e5db29387df42547e8e6b (patch) | |
tree | 2d68c36342302a9bd4bfef535d5c00daf5f8da04 /gjs/global.cpp | |
parent | 6ab6db38fe5a45979167d2b6f0cadd06a772798f (diff) | |
download | gjs-a06e890b8d06f019b49e5db29387df42547e8e6b.tar.gz |
modules: Use ESM as the primary module systemewlsh/replace-internal-imports
Diffstat (limited to 'gjs/global.cpp')
-rw-r--r-- | gjs/global.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gjs/global.cpp b/gjs/global.cpp index 56fe8602..8f3f4cce 100644 --- a/gjs/global.cpp +++ b/gjs/global.cpp @@ -88,7 +88,7 @@ class GjsBaseGlobal { static bool run_bootstrap(JSContext* cx, const char* bootstrap_script, JS::HandleObject global) { GjsAutoChar uri = g_strdup_printf( - "resource:///org/gnome/gjs/modules/script/_bootstrap/%s.js", + "resource:///org/gnome/gjs/modules/_bootstrap/%s.js", bootstrap_script); JSAutoRealm ar(cx, global); @@ -288,6 +288,7 @@ class GjsInternalGlobal : GjsBaseGlobal { 0), JS_FN("setModulePrivate", gjs_internal_set_module_private, 2, 0), JS_FN("uriExists", gjs_internal_uri_exists, 1, 0), + JS_FN("loadNative", &load_native_module, 1, 0), JS_FS_END}; static constexpr JSClass klass = { @@ -486,7 +487,7 @@ bool gjs_global_registry_get(JSContext* cx, JS::HandleObject registry, * @global: a JS global object that has not yet been passed to this function * @realm_name: (nullable): name of the realm, for debug output * @bootstrap_script: (nullable): name of a bootstrap script (found at - * resource://org/gnome/gjs/modules/script/_bootstrap/@bootstrap_script) or + * resource://org/gnome/gjs/modules/_bootstrap/@bootstrap_script) or * %NULL for none * * Defines properties on the global object such as 'window' and 'imports', and |