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

setInterval does not return a handle #16078

Closed
brandoncurtis opened this issue Feb 12, 2018 · 3 comments
Closed

setInterval does not return a handle #16078

brandoncurtis opened this issue Feb 12, 2018 · 3 comments

Comments

@brandoncurtis
Copy link

brandoncurtis commented Feb 12, 2018

System information

Version: 1.7.3-stable
Git Commit: 4bb3c89
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.9.2
Operating System: linux (Ubuntu 16.04 x64)

Expected behaviour

> var handle = setInterval(function() {console.log("hello world\n");}, 10000);

setInterval should return a handle that can be used in clearInterval.

Actual behaviour

> var handle = setInterval(function() {console.log("hello world\n");}, 10000);
undefined
> handle
{}

Issues also dealing with setInterval

#1082, #1083, #1811, #1999,

@karalabe
Copy link
Member

What would you like to do?

The console is not a full fledged JavaScript interpreter, rather a limited one based on ottovm. The setInterval and setTimeout methods were not supported by it and were added retrospectively by us. Although we could keep patching it, do you really need to use the console for such advanced features?

@brandoncurtis
Copy link
Author

I think that's a compelling argument for documenting it and leaving it unfixed. I wasn't familiar with the history of the console and its basis in ottovm.

@stale
Copy link

stale bot commented Feb 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot closed this as completed Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants