Open pkrukp opened 4 years ago
Yes. But if your async callback has nested promises and awaits for them then you will struggle Events-vs-Promises execution order because sax-js will not pause generation of new events. And there is no pause method to stop events. Even readable stream pause method will not help to achieve synchronous processing.
@pkruk2 have a look at this solution: https://github.com/lddubeau/saxes/issues/32#issuecomment-640493042
Hi,
I'm trying to figure out if I can do
sax.createStream().on("opentag", async (node) => { ...
- will sax wait for Promise returned by the callback?I searched code on github for "Promise", "then", "catch" but found nothing, so I suppose it won't?