Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bit more ergonomics under the current isolation realms? #300

Closed
Jack-Works opened this issue Apr 22, 2021 · 1 comment
Closed

A bit more ergonomics under the current isolation realms? #300

Jack-Works opened this issue Apr 22, 2021 · 1 comment

Comments

@Jack-Works
Copy link
Member

The currently isolated realms only have primitives and wrapped callables to be passed.
Although it is already enough for cross-realms communication, it will be quite a pain API to use.

I'm curious if it is possible to add more kinds of items to be wrapped, for example:

  • Promise (wrap and forward status changes)
  • Generator/AsyncGenerator (with the result object re-created in the current realm and value get wrapped)
@leobalter
Copy link
Member

This is not what we are pursuing here and goes beyond the goals for ergonomics of a low level API.

We decided this while removing AsyncFunction in #289 and from several iterations over this new proposal. I believe I also made it clear in the TC39 plenary this week that is intentional we are not giving special handlers for non-callable objects.

It would be too much to be wrapped in engine level while this communication is already possible through a membrane framework implementation in user land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants