You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
quickjs-ng (and most forks/patches of the original quickjs) expose JS_GetModuleExport and related functions that allow accessing the value of an ESM export, which makes it great for a plugin system. Work is still ongoing in the original quickjs (see bellard/quickjs#35), so there may need to be placeholders that throw an exception when a non-quickjs-ng build is used, but I would really like to see this added.
The text was updated successfully, but these errors were encountered:
I'd follow upstream here, which is to expose JS_GetModuleNamespace. Can you propose an interface for how it's used in Javascript code? quickjs-emscripten doesn't have any public APIs that use JSModuleDef, I'm curious what would work for your use-case.
The use case is for when you want to get a value from a JavaScript file instead of evaluating code. So instead of something like vm.evalCode, you'd have:
quickjs-ng (and most forks/patches of the original quickjs) expose
JS_GetModuleExport
and related functions that allow accessing the value of an ESM export, which makes it great for a plugin system. Work is still ongoing in the original quickjs (see bellard/quickjs#35), so there may need to be placeholders that throw an exception when a non-quickjs-ng build is used, but I would really like to see this added.The text was updated successfully, but these errors were encountered: