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

Support set/clearTimeout #1081

Open
p-bakker opened this issue Nov 2, 2021 · 2 comments
Open

Support set/clearTimeout #1081

p-bakker opened this issue Nov 2, 2021 · 2 comments
Labels
feature Issues considered a new feature

Comments

@p-bakker
Copy link
Collaborator

p-bakker commented Nov 2, 2021

The settimeout & clearTimeout API's are widely available in JavaScript runtimes, but not part of the EcmaScript specification. They are defined by https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout-dev

It makes sense to support these API's in Rhino, but only as an opt-in feature, similar to #1012

Some support for these API's got added in v1.7.14 (see #1003), but only to aid in a more correct 'score'on the Kangax Compat table for the Promises support that landed in v1.7.14.

This case is to:

  • make the impl. spec compliant
  • make the impl. work correctly in the shell
  • make the implementation available behind a feature flag, also outside of the shell
@p-bakker p-bakker added the feature Issues considered a new feature label Nov 2, 2021
@MaxisTekfield
Copy link
Contributor

Is rhino going to support async programming? Such as Promise APIs.

@p-bakker
Copy link
Collaborator Author

p-bakker commented Nov 23, 2021

Rhino 1.7.14 (to be released in ~2 weeks, RC available) ships with promise support.

Async/await support is in the backlog, no eta for that one, as it's development depends on someone in the community putting in the effort.

Once 1.7.14 is released, the compile target setup for Babel can be updated to include 1.7.14, after which you should be able to use Babel to compile async/await code to promises

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

No branches or pull requests

2 participants