symphonyoss / ContainerJS

ContainerJS provides an abstraction layer over multiple HTML5 containers (OpenFin, Electron, Browser), that follows the Symphony Desktop APIs
https://symphonyoss.github.io/ContainerJS/
Apache License 2.0
30 stars 10 forks source link

Change promises to use async/await syntax #264

Open BenLambertNcl opened 7 years ago

BenLambertNcl commented 7 years ago

Might be better to use async/await over promises in the API to enhance readability. This could be especially useful in the tests, where were are currently using chainPromises() to make the code easier to read. Do we think this could be useful?

andy-lee-eng commented 7 years ago

Is this something we can actually do? I'd assumed the public API had to be promises, because an async/await API can't be consumed by regular JavaScript..?

BenLambertNcl commented 7 years ago

Hmm yeah you could be right. We could still use this for tests though instead of chainPromises.