leobalter / shadowrealms-polyfill

MIT License
58 stars 0 forks source link

Explore the import function #4

Closed leobalter closed 3 years ago

leobalter commented 3 years ago

Currently the import function cannot resolve to a module namespace object so it is limited to only resolve to undefined showing when the injection is fulfilled. The injected code should work on globals, which is a bit weak for the API.

littledan commented 3 years ago

Resolving to undefined makes sense to me. I like the idea in #8 to have a specific API to import a function in a wrapped way. Maybe this subsumes the need for the import API.