Skip to content

Conversation

@tindzk
Copy link
Contributor

@tindzk tindzk commented Sep 18, 2014

See also issue #49

@sjrd
Copy link
Member

sjrd commented Sep 20, 2014

Oops, sorry for the delay, here.
Could you please also update similarly setInterval and setImmediate? These 3 should be typed consistently.

@tindzk
Copy link
Contributor Author

tindzk commented Sep 21, 2014

Good call. I just updated my commit.

@sjrd
Copy link
Member

sjrd commented Sep 21, 2014

LGTM

sjrd added a commit that referenced this pull request Sep 21, 2014
WindowTimers: More concrete signature for setTimeout()
@sjrd sjrd merged commit 080d3a3 into scala-js:master Sep 21, 2014
@lihaoyi
Copy link
Contributor

lihaoyi commented Sep 21, 2014

One thing to take note of is that we're consciously removing this call semantics from the stub:

var timeoutID = window.setTimeout(code, delay); // code in the alternate syntax is a string of code you want to execute after delay milliseconds (using this syntax is not recommended for the same reasons as using eval())

Not that I'd miss it, but I didn't see it discussed, so it's worth bringing up. I say it's totally worth breaking compatibility with the real dom to kill a stupid API

@vendethiel
Copy link
Contributor

I agree. Death to eval (and new Function).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants