| commit | 6d2229417d5188562468debb94804521d987fff4 | [log] [tgz] |
|---|---|---|
| author | Srujan Gaddam <58529443+srujzs@users.noreply.github.com> | Mon Jun 17 14:13:31 2024 -0700 |
| committer | GitHub <noreply@github.com> | Mon Jun 17 14:13:31 2024 -0700 |
| tree | cb5955fad605ab4a2f1f0d42c2b91fc908811289 | |
| parent | 2fe754fb396cb9b87010f0318cfbfc5408346c48 [diff] |
Add Float16Array alias (#255) This is a new typed array in the w3 spec. Since we don't have a specific type for this, we alias it to JSTypedArray.
Lightweight browser API bindings built around JS interop.
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.
import 'package:web/web.dart'; void main() { final div = document.querySelector('div')!; div.text = 'Text set at ${DateTime.now()}'; }
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.
The generator scripts use a number of conventions to consistently handle Web IDL definitions:
JSObject.implements between extension types.JSArray and JSPromise.String.JSFunction.String instead of JSString.JSAny?.JSObject.Most of the APIs in this package are generated from public assets. See tool/README.md for information on the spec and IDL versions the package was generated from, and for the process for updating the package.