Closed zicklag closed 5 years ago
I think this should be made more crossplatform, so users don't have to #if js Also, the import most likely fails on not js targets
You are right about the import. :+1:
I am a little unsure about how to make it more cross-platform, though. What do you think about just making the init function work on HL and JS and for HL just have it call the callback immediately so that the workflow is the same for both targets?
Yes. Although it would be optional on HL.
Le jeu. 7 févr. 2019 03:25, Zicklag notifications@github.com a écrit :
You are right about the import. 👍
I am a little unsure about how to make it more cross-platform, though. What do you think about just making the init function work on HL and JS and for HL just have it call the callback immediately so that the workflow is the same for both targets?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ncannasse/webidl/pull/10#issuecomment-461266244, or mute the thread https://github.com/notifications/unsubscribe-auth/AA-bwBh87Cd5MxRdi1WtKI6ENbcNiYsNks5vK463gaJpZM4akYmq .
It should be good now. The init function can be called the same on both HL and JS.
Modularize the JavaScript output and update the bindings to match. This has two important advantages:
This also includes an update to the sample to use the JS init callback. The sample would actually fail for me without this patch because the point class was not initialized by the time that the sample code ran.