-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Implement support for callback interfaces #172
Implement support for callback interfaces #172
Conversation
2696003
to
48d968f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool; this will be great to have.
698c85b
to
9cd8797
Compare
I cannot push my fixes to this branch. It would be really nice if you could avoid this separate-organization business and just use personal forks, if you are going to contribute to jsdom. |
It says you still haven’t accepted the invite: https://github.com/EB-Forks/jsdom/invitations |
The invitation has expired. Regardless, I don't want to have to join another organization to collaborate on my own projects. |
Co-Authored-By: Domenic Denicola <[email protected]>
e1e5075
to
422d016
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More to come later.
Co-Authored-By: Timothy Gu <[email protected]>
README.md
Outdated
|
||
Performs the Web IDL conversion algorithm for this callback interface, converting _value_ into a function that performs [call a user object’s operation](https://heycam.github.io/webidl/#call-a-user-objects-operation) when called, with `thisArg` being the `this` value of the converted function. | ||
|
||
The resulting function has an `objectReference` property, which is the same object as `value` and can be used to perform identity checks, as `convert` returns a new function object every time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also mention that we don't implement the callback context yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The callback context is used to ensure that the callbacks are executed in the correct realm, which is handled for us by the platform.
Thanks! |
This adds support for callback interfaces.
Needed for jsdom/jsdom#2869 (jsdom/jsdom#2884).
To do:
Supersedes and closes #178.
review?(@domenic, @TimothyGu): I’ve now rebased this on top of #182.