Closed yeikel16 closed 3 months ago
Do you know if the WASM support is the same as the previous JS support, all the same browsers would be supported using WASM?
Yes is the same API, but the decision to compile using --wasm
is made by the developer.
To support compilation to Wasm, Dart has shifted how it enables interop with browser and JavaScript APIs. This shift prevents Dart code that uses dart:html or package:js from compiling to Wasm.
Instead, Dart now provides new, lightweight interop solutions built around static JS interop:
package:web, which replaces dart:html (and other web libraries) dart:js_interop, which replaces package:js and dart:js
See some docs
Use the
web
package in web platform to allowwasm
compilation.Fix #523
Run:
Output: