How to achieve importValue
similar to the Shadow Realms proposal?
#1246
Unanswered
samuelstroschein
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I am elaborating on whether endo/ses can securely run third-party (business logic) code as part of a browser-based application. A (draft) RFC goes into more details and can be read here opral/monorepo#127. The summary goes as follows:
Example config file:
The Shadow Realms proposal introduces an
importValue
function that allows the binding of exported functions. Taking the exemplary config, consuming the export functions looks as follows:I am wrapping my head around SES on how I could accomplish the desired effect of "loading" a module into a compartment. The documentation is unclear on how to achieve the desired effect, and if it's even possible. I found the Static Module Record package which seems to go in the direction I want but is dependent on Node and the documentation is minimal.
An illustration of what I want to achieve:
Does SES suit the described use case? If so, how could the desired effect of "loading" code into a compartment be achieved?
Beta Was this translation helpful? Give feedback.
All reactions