Using dart to create a javascript library

后端 未结 2 1270
感情败类
感情败类 2021-01-13 13:22

The problem

I\'m currently working on a JavaScript library, and in order to reduce the amount of bugs I thought that my library might benefit from using Dart\'s sta

2条回答
  •  醉话见心
    2021-01-13 13:58

    Even though Dart supports this use case, if you target JavaScript developers I would stick with JavaScript.

    @AlexandreArdhuin shows in his answer to Expose Dart functions to javascript how you can make a Dart function available to JavaScript.
    Under the dart-js-interop are many examples how to do function calls and pass data between Dart and JavaScript.

提交回复
热议问题