-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat(jupyter): Await return from Jupyter.display
#20807
Conversation
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.
Cool, can you update the integration test notebook to showcase that async functions are supported as well? You add add a promise that resolves after 100ms and only then provides an output.
Done! |
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.
LGTM, thank you @manzt!
Thanks @manzt and @bartlomieju! I made a |
Allows `Jupyter.display` to return a promise. Example: ```javascript class WikiPage { constructor(public name) {} async [Symbol.for("Jupyter.display")]() { let response = await fetch("https://en.wikipedia.org/wiki/" + this.name); return { "text/html": await response.text() } } } new WikiPage("Deno_(software)") ```
Allows
Jupyter.display
to return a promise.Silly example: