- Problem: We can only transfer callable objects and primitive values between a ShadowRealm and an incubator realm.
- This code demonstrates a simple solution (that’s not completely safe).
- Runs in Safari Technology Preview: https://webkit.org/blog/12522/release-notes-for-safari-technology-preview-142/
- A more complete solution: https://github.com/caridy/irealm
Material:
- Proposal for ShadowRealms: https://github.com/tc39/proposal-shadowrealm
- Proxies: https://exploringjs.com/deep-js/ch_proxies.html