txiki.js icon indicating copy to clipboard operation
txiki.js copied to clipboard

Top level await

Open TheNoim opened this issue 3 years ago • 3 comments

Hi,

One killer feature for simple scripting could be top level await.

Currently, top level await isn't supported by either quickjs or txiki.js, I can't tell for sure.

TheNoim avatar Aug 07 '21 10:08 TheNoim

It's QuickJS. Once it gains support for it I'll update the dependency and txiki.js will have it too.

saghul avatar Aug 07 '21 10:08 saghul

What is the proper way to wait for a Promise to resolve/reject from an eval context in the meantime?

brandonros avatar Oct 10 '21 02:10 brandonros

I guess an async iife?

saghul avatar Oct 11 '21 06:10 saghul

Fixed in https://github.com/saghul/txiki.js/pull/362

saghul avatar Feb 02 '23 11:02 saghul