JavaScript interoperability

The Dart web platform supports communication with JavaScript apps and libraries, as well as browser APIs, using dart:js_interop.

Web developers can benefit from using external JS libraries in their Dart code, without having to rewrite anything in Dart.

Next-generation JS interop


The Dart team recently overhauled the collection of features and APIs that allow developers access to JavaScript and browser bindings in their Dart code. This next generation of web interop not only improves user experience, but also enables Wasm support, aligning Dart with the future of the Web.

The following table maps Dart's new JS and web interop solutions to their past counterparts:

The Dart interop story has been under heavy development for some time now; check out the Past JS interop page for a more in depth summary on past iterations.



For information on how to write and use JavaScript interop:

For information on interacting with web APIs:

For tutorials and help:

For information on previous JavaScript interop libraries:

For additional documentation on JavaScript interop: