fuse-open / fuselibs

Fuselibs is the Uno-libraries that provide the UI framework used in Fuse apps
https://npmjs.com/package/@fuse-open/fuselibs
MIT License
176 stars 72 forks source link

Fuse.Scripting.JavaScript: support async/await #1465

Closed mortend closed 1 year ago

mortend commented 1 year ago

This adds "regenerator-runtime"  which makes it possible to use async/await from transpiled JavaScript or TypeScript code, e.g.:

async example() {
    try {
        await Foo.requestPermission()
        console.log("Permission granted!")
    } catch (e) {
        console.error(e)
    }
}

Source: https://github.com/facebook/regenerator/tree/e4b592a44ef0d3a366cc7ad6125c4d9c8f6cc597/packages/runtime