Alexandre Ardhuin has a package to help automate exposing a JS library in Dart. You write a Dart interface that mirrors the JS API. He has a tool which parses that and generates an equivalent API which uses dart:js for interop.
https://github.com/a14n/dart-js-wrapping
He's created several utility classes which closely mirror some of our objects. From Alexandre:
The most important class is TypedJsObject which look really like your ChromeObject . There are some other similarities between my IsEnum and your ChromeEnum . You can also be interested by TypedJsArray that give you a Dart adapter to handle jsArray.
If his library gets traction, we could consider replacing our ChromeObject* classes with his implementations.
@kevmoo @financecoding @a14n
Alexandre Ardhuin has a package to help automate exposing a JS library in Dart. You write a Dart interface that mirrors the JS API. He has a tool which parses that and generates an equivalent API which uses dart:js for interop.
https://github.com/a14n/dart-js-wrapping
He's created several utility classes which closely mirror some of our objects. From Alexandre:
If his library gets traction, we could consider replacing our ChromeObject* classes with his implementations.
@kevmoo @financecoding @a14n