Issue metadata
Sign in to add a comment
|
top-level await for browser console |
||||||||||||||||||||||||
Issue description
Chrome Version: 59
OS: all
What steps will reproduce the problem?
Run this on browser console
let result = await new Promise(resolve => setTimeout(() => resolve('Hi'), 1000));
What is the expected result?
Same result as if wrapped with (async function () { ... }());
What happens instead?
Throws an error.
As can be seen on https://github.com/nodejs/node/issues/13209 top-level await is considered a helpful feature for working with promises on the development, as node.js investigates possible ways for providing this, I think it would be good idea if Chrome could also go for providing this for the browser developers and perhaps you can help node.js for taking a better approach for implementing this feature there also.
,
May 30 2017
Excellent, what Safari supports already suffice for me also, so I am going to change the bug description to what already supported on Safari
,
May 30 2017
,
May 30 2017
OK. Is'n this weird and inconsistent?
,
May 31 2017
IMO JS has lots of corner cases, my favorite one is this one https://bugs.chromium.org/p/v8/issues/detail?id=457#c1 which didn't block tail call implementation eventually; this one is less distrubing one as it targets just console REPL and also is already done on Safari. (lets continue on node topic)
,
May 31 2017
,
May 31 2017
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by chi...@gmail.com
, May 30 201727.9 KB
27.9 KB View Download