Dynamically importing Javascript from URL or String and manipulating the module #3539
Unanswered
ten3roberts
asked this question in
Q&A
Replies: 1 comment
-
You could do it with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Is it possible to import a ES module from a url or other downloaded text and
import
it through wasm.Ideally, this will return an
Object
likeimport
does, upon which you can dynamically reflect and call the exports or default export.Additional Details
The wasm file has no prior data on the javascript file, and can as such not be used with the
#[wasm_bindgen(module = )]
macro, as that requires the JS file to be known at compile time and will become globally available.I would need a dynamic local object that is returned where and when it is needed
Beta Was this translation helpful? Give feedback.
All reactions