Skip to content
/ web Public
forked from dart-lang/web

Evolution of Dart Web, Browser, JS support

License

Notifications You must be signed in to change notification settings

srujzs/web

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dart CI pub package package publisher

Lightweight browser API bindings built around JS interop.

What's this?

This package exposes browser APIs. It's generated from the Web IDL definitions and uses recent Dart language features for zero-overhead bindings.

This package is intended to replace dart:html and similar Dart SDK libraries. It will support access to browser APIs from Dart code compiled to either JavaScript or WebAssembly.

Usage

import 'package:web/web.dart';

void main() {
  final div = document.querySelector('div')!;
  div.text = 'Text set at ${DateTime.now()}';
}

Migrating to package:web

package:web is replacing dart:html and other web libraries as Dart's long-term web interop solution. To learn how to migrate from dart:html APIs to package:web, see our migration guide.

Generation

This package is generated by web_generator. See the README for more details on the conventions used to generate this package and how to run the different tools to generate bindings and update various package dependencies.

About

Evolution of Dart Web, Browser, JS support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 99.9%
  • Other 0.1%