- Notifications
You must be signed in to change notification settings - Fork26
Lightweight browser API bindings built around JS static interop.
License
dart-lang/web
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Lightweight browser API bindings built aroundJS interop.
This package exposes browser APIs. It's generated from the Web IDL definitionsand uses recent Dart language features for zero-overhead bindings.
This package is intended to replacedart:html
andsimilar Dart SDK libraries. It will support access to browser APIs from Dartcode compiled to either JavaScript or WebAssembly.
import'package:web/web.dart';voidmain() {final div= document.querySelector('div')!; div.text='Text set at ${DateTime.now()}';}
package:web
is replacingdart:html
and other web libraries as Dart'slong-term web interop solution. To learn how to migrate fromdart:html
APIs topackage:web
, see ourmigration guide.
This package is generated byweb_generator
. See theREADME
for moredetails on the conventions used to generate this package and how to run thedifferent tools to generate bindings and update various package dependencies.
About
Lightweight browser API bindings built around JS static interop.