Turning on async functions experimental feature

41 views
Skip to first unread message

Dev F

unread,
Jan 16, 2015, 5:09:45 AM1/16/15
to traceur-comp...@googlegroups.com
Ho do I turn on th experimental feature for Async Functions?

Thank you!

Dev F

unread,
Jan 16, 2015, 5:32:15 AM1/16/15
to traceur-comp...@googlegroups.com
Wanted to add,  it's for  traceur in webpage compiling on the fly.

Erik Arvidsson

unread,
Jan 16, 2015, 9:19:40 AM1/16/15
to traceur-comp...@googlegroups.com
At the moment you can do this by setting experimental or
asyncFunctions to true. It needs to be done before your script tag:

<script src="bin/traceur.js"></script>
<script src="bin/traceur-runtime.js"></script>
<script>
// traceur.options.experimental = true;
traceur.options.asyncFunctions = true;
</script>
<script type="text/traceur">
async function f() {
...
}
</script>
> --
> You received this message because you are subscribed to the Google Groups
> "traceur-compiler-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to traceur-compiler-d...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
erik

Dev F

unread,
Jan 21, 2015, 3:01:14 PM1/21/15
to traceur-comp...@googlegroups.com
Thanks you!

Since I'm using systemjs, had to set  System.traceurOptions
System.traceurOptions.asyncFunctions = true;
Reply all
Reply to author
Forward
0 new messages