web 0.5.0 copy "web: ^0.5.0" to clipboard
web: ^0.5.0 copied to clipboard

Platformweb

Lightweight browser API bindings built around JS static interop.

Dart CI pub package package publisher

Lightweight browser API bindings built around JS static 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()}';
}

Web IDL version #

Based on:

For instructions on re-generating the DOM bindings, see the generator docs.

91
likes
120
pub points
100%
popularity

Publisher

verified publisherdart.dev

Lightweight browser API bindings built around JS static interop.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

More

Packages that depend on web