# JavaScript interoperability

> Integrate JavaScript code into your Dart web app.



Seamlessly integrate JavaScript libraries and APIs into your Dart web app.

## Overview {: #overview }

The [Dart web platform][] provides powerful tools to
call JavaScript from Dart and vice-versa and allows you to leverage the vast
JavaScript ecosystem without leaving your Dart code.

This page provides a central hub for learning about JavaScript interoperability
in Dart. You'll find resources to get you started, detailed usage guides, and
information on the latest `dart:js_interop` library. Whether you're looking to
use a specific JavaScript library, or interact with browser APIs, this is the
place to start.

Get started wtih JS interop:
  * [Getting started with Javascript interop]
  * [How to mock JavaScript interop objects]

Review the reference guides:
  * [Usage reference]
  * [JS types reference]

Interact with the browser:
  * [`package:web` and migration]

[Dart web platform]: /web
[Usage reference]: /interop/js-interop/usage
[JS types reference]: /interop/js-interop/js-types
[`package:web` and migration]: /interop/js-interop/package-web
[Getting started with Javascript interop]: /interop/js-interop/start
[How to mock JavaScript interop objects]: /interop/js-interop/mock

## The evolution of JavaScript interop {: #next-generation-js-interop }

[Dart 3.3][] introduces a new generation of JS interop that offers
a unified set of features and APIs to access JavaScript and browser
functionalities within your Dart code. This modern approach enhances the
developer experience and enables WebAssembly ([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:

| New interop libraries        | Previous libraries                       |
|------------------------------|------------------------------------------|
| [`package:web`][] | [`dart:html`][] <br> [`dart:indexed_db`][] <br> [`dart:svg`][] <br> [`dart:web_audio`][] <br> [`dart:web_gl`][] |
| [`dart:js_interop`][] <br> [`dart:js_interop_unsafe`][] | [`package:js`][] <br> [`dart:js`][] <br> [`dart:js_util`][] |

{:.table .table-striped}

[Dart 3.3]: https://blog.dart.dev/dart-3-3-325bf2bf6c13
[Wasm]: /web/wasm
[`package:web`]: https://pub.dev/packages/web
[`dart:html`]: https://api.dart.dev/dart-html/
[`dart:svg`]: https://api.dart.dev/dart-svg/
[`dart:indexed_db`]: https://api.dart.dev/dart-indexed_db/
[`dart:web_audio`]: https://api.dart.dev/dart-web_audio/
[`dart:web_gl`]: https://api.dart.dev/dart-web_gl/
[`dart:js_interop`]: https://api.dart.dev/dart-js_interop/
[`dart:js_interop_unsafe`]: https://api.dart.dev/dart-js_interop_unsafe/
[`package:js`]: https://pub.dev/documentation/js
[`dart:js`]: https://api.dart.dev/dart-js/
[`dart:js_util`]: https://api.dart.dev/dart-js_util/

## Work with deprecated features {: #deprecated-features }

If you maintain legacy code, you can continue to work with some deprecated features.
To learn more about JS interop deprecated features, see the [Past JS interop][] guide.

## Additional resources {: #additional-resources }

Previous JavaScript interop libraries:
  * [Past JS interop]

Additional documentation on JavaScript interop:
  * [`dart:js_interop` API reference]
  * [`dart:js_interop_unsafe` API reference]

[Past JS interop]: /interop/js-interop/past-js-interop
[`dart:js_interop` API reference]: https://api.dart.dev/dart-js_interop/
[`dart:js_interop_unsafe` API reference]: https://api.dart.dev/dart-js_interop_unsafe/

