web
Lightweight browser API bindings built around JS interop.
1.1.1
9.3M downloads/mo
#37 most downloaded on pub.dev
dart-lang/web
What this package is like to depend on
Last release 1 years ago
no release in 18 months
Release timing varies
gaps range from 8 days to 5 months
Nearly every release is documented
notes for 9 of 10 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
19 releases · first in 2015
0 releases in the last 12 months
see the full history below
Release timeline
19 releases · Jul 2015 to Feb 2025Releases
latest 19-
1.1.126 Feb 2025Release notes
Open source →- Deprecated
Node.textextension. UseNode.textContentinstead. - Deprecated
[]extensions onStorage.
Release notes
Open source →- Deprecated
Node.textextension. UseNode.textContentinstead. - Deprecated
[]extensions onStorage.
- Deprecated
-
1.1.024 Sep 2024Release notes
Open source →- Added
HttpStatusclass that declares http status codes. This is a copy of
theHttpStatusfrom thedart:_internallibrary that's exposed only through
dart:ioanddart:html. - Added
JSImmutableListWrapperwhich helps create a dart list from a JS list. - Deprecated
TouchListWrapperandTouchListConvertin favor of
JSImmutableListWrapper. - Added
[]and[]=overloaded operators to types which define unnamed
getters andsetters, respectively. - Exposed constants with primitive values as non-
externalso they can be
switched over. - Add an extension
responseHeaderstoXMLHttpRequest. - Correctly namespace
WebAssemblytypes. - Added
CrossOriginWindowandCrossOriginLocationwrappers for cross-origin
windows and locations, respectively, that can be accessed through
HTMLIFrameElement.contentWindowCrossOrigin,Window.openCrossOrigin,
Window.openerCrossOrigin,Window.topCrossOrigin,
andWindow.parentCrossOrigin.
Release notes
Open source →- Added
HttpStatusclass that declares http status codes. This is a copy of theHttpStatusfrom thedart:_internallibrary that's exposed only throughdart:ioanddart:html. - Added
JSImmutableListWrapperwhich helps create a dart list from a JS list. - Deprecated
TouchListWrapperandTouchListConvertin favor ofJSImmutableListWrapper. - Added
[]and[]=overloaded operators to types which define unnamedgetters andsetters, respectively. - Exposed constants with primitive values as non-
externalso they can beswitched over. - Add an extension
responseHeaderstoXMLHttpRequest. - Correctly namespace
WebAssemblytypes. - Added
CrossOriginWindowandCrossOriginLocationwrappers for cross-origin windows and locations, respectively, that can be accessed throughHTMLIFrameElement.contentWindowCrossOrigin,Window.openCrossOrigin,Window.openerCrossOrigin,Window.topCrossOrigin, andWindow.parentCrossOrigin.
- Added
-
1.0.016 Jul 2024Release notes
Open source →- Added supertypes' fields to dictionary constructors as dictionaries are
allowed to contain those fields. - Empty dictionary constructors now create an empty object instead of being
treated like non-object literalexternalconstructors. - Generate MDN API documentation for getters.
- Update the docs for generated interface types to reference the MDN Web Docs
project. - Address several broken links in API documentation.
- Generate APIs based on if they're on track to be a standard and not
experimental. This is a looser restriction from the previous requirement that
APIs need to be implemented by Chrome, Firefox, and Safari. As part of this,
dictionaries and typedefs are only emitted if they're used by a generated API. - Added
onUnloadevent stream toElementEventGettersextension methods. - Expose
ElementStreamas a public class. - Require Dart
^3.4.0. - APIs that return a double value now return
doubleinstead ofnum. This is
to avoid users accidentally downcastingnum, which has different semantics
depending on whether you compile to JS or Wasm. See issue [#57][] for more
details. - Fix an issue where some union types didn't account for typedef nullability.
[#57]: #57
Release notes
Open source →- Added supertypes' fields to dictionary constructors as dictionaries are allowed to contain those fields.
- Empty dictionary constructors now create an empty object instead of being
treated like non-object literal
externalconstructors. - Generate MDN API documentation for getters.
- Update the docs for generated interface types to reference the MDN Web Docs project.
- Address several broken links in API documentation.
- Generate APIs based on if they're on track to be a standard and not experimental. This is a looser restriction from the previous requirement that APIs need to be implemented by Chrome, Firefox, and Safari. As part of this, dictionaries and typedefs are only emitted if they're used by a generated API.
- Added
onUnloadevent stream toElementEventGettersextension methods. - Expose
ElementStreamas a public class. - Require Dart
^3.4.0. - APIs that return a double value now return
doubleinstead ofnum. This is to avoid users accidentally downcastingnum, which has different semantics depending on whether you compile to JS or Wasm. See issue #57 for more details. - Fix an issue where some union types didn't account for typedef nullability.
- Added supertypes' fields to dictionary constructors as dictionaries are
-
0.5.105 Mar 2024Release notes
Open source →- Add
TrustedTypesmembers. - Include MDN API documentation as class and member dartdoc comments. Docs
sourced from the [MDN Web Docs][] project; attributions and copyright
licensing by Mozilla Contributors is licensed under [CC-BY-SA 2.5][]. - Add a constructor for each Element tag onto their respective Element
interfaces. - Remove
externalElement constructors that would result in a runtime error. - Deprecate
createAudioElementin favor of theHTMLAudioElementconstructor.
[MDN Web Docs]: https://developer.mozilla.org/en-US/docs/Web
[CC-BY-SA 2.5]: https://creativecommons.org/licenses/by-sa/2.5/
Release notes
Open source →- Add
TrustedTypesmembers. - Include MDN API documentation as class and member dartdoc comments. Docs sourced from the MDN Web Docs project; attributions and copyright licensing by Mozilla Contributors is licensed under CC-BY-SA 2.5.
- Add a constructor for each Element tag onto their respective Element interfaces.
- Remove
externalElement constructors that would result in a runtime error. - Deprecate
createAudioElementin favor of theHTMLAudioElementconstructor.
- Add
-
0.5.013 Feb 2024Release notes
Open source →- Redeprecate APIs that were deprecated in
0.4.1but undeprecated in0.4.2. - Add support for
dart fixmigrations fromdart:htmlclasses to
package:webclasses. - Contribute a markdown file for the renamed classes from
dart:htmlto
package:web(see renames.md). - Migrate classes to use interop extension types that implement
JSObject. - Add generics to APIs that use
JSArrayandJSPromise. Typedefs of a Dart
primitive type are instead replaced with their JS type equivalent if they
appear as a type parameter in order to conform with the type bounds of
JSArrayandJSPromise. - Changed
recordtypes to beJSObjectinstead ofJSAny. - Reduce the number of DOM APIs we generate code for. Currently, the API needs
to be standards-track, and be supported by Safari, Chrome, and Firefox. - Updated the source IDL version to
3.43.1. - Deprecate a few type aliases in favor of their standardized versions:
Deprecated Preferred AudioElementHTMLAudioElementHtmlElementHTMLElementCanvasElementHTMLCanvasElementImageElementHTMLImageElementVideoElementHTMLVideoElementCssStyleDeclarationCSSStyleDeclarationContextEventWebGLContextEventWebGLWebGLRenderingContext - Deprecate the top-level
createElementTag,createCanvasElement,
createIFrameElement, andquerySelectorfunctions.
Instead, use the standard creation and query methods ondocument. - Deprecate the
clientextension methods onMouseEventandTouch.
Instead, directly use theclientXandclientYproperties. - Deprecate the
HttpRequestAPI borrowed fromdart:html.
Consider migrating topackage:httpinstead.
Release notes
Open source →-
Redeprecate APIs that were deprecated in
0.4.1but undeprecated in0.4.2. -
Add support for
dart fixmigrations fromdart:htmlclasses topackage:webclasses. -
Contribute a markdown file for the renamed classes from
dart:htmltopackage:web(see renames.md). -
Migrate classes to use interop extension types that implement
JSObject. -
Add generics to APIs that use
JSArrayandJSPromise. Typedefs of a Dart primitive type are instead replaced with their JS type equivalent if they appear as a type parameter in order to conform with the type bounds ofJSArrayandJSPromise. -
Changed
recordtypes to beJSObjectinstead ofJSAny. -
Reduce the number of DOM APIs we generate code for. Currently, the API needs to be standards-track, and be supported by Safari, Chrome, and Firefox.
-
Updated the source IDL version to
3.43.1. -
Deprecate a few type aliases in favor of their standardized versions:
Deprecated Preferred AudioElementHTMLAudioElementHtmlElementHTMLElementCanvasElementHTMLCanvasElementImageElementHTMLImageElementVideoElementHTMLVideoElementCssStyleDeclarationCSSStyleDeclarationContextEventWebGLContextEventWebGLWebGLRenderingContext -
Deprecate the top-level
createElementTag,createCanvasElement,createIFrameElement, andquerySelectorfunctions. Instead, use the standard creation and query methods ondocument. -
Deprecate the
clientextension methods onMouseEventandTouch. Instead, directly use theclientXandclientYproperties. -
Deprecate the
HttpRequestAPI borrowed fromdart:html. Consider migrating topackage:httpinstead.
- Redeprecate APIs that were deprecated in
-
0.4.212 Jan 2024Release notes
Open source →- Undeprecate some APIs and helpers library that were deprecated in 0.4.1.
Because deprecations are breaking in Flutter, they should be done in a
breaking change
Release notes
Open source →- Undeprecate some APIs and helpers library that were deprecated in
0.4.1. Because deprecations are breaking in Flutter, they should be done in a breaking change.
- Undeprecate some APIs and helpers library that were deprecated in 0.4.1.
-
0.4.111 Jan 2024Release notes
Open source →- Exported the helper libraries from
web.dart. - Deprecated the
helpers.dartlibrary in favor ofweb.dart. - Updated the readme to include usage info and package status.
- Added an example.
- Added event extensions for
WebSocket - Fixes to the return types of the
append()andclone()extension methods onNode. - Deprecated
NodeGlue.appendin favor ofNode.appendChild. - Deprecated
NodeGlue.clonein favor ofNode.cloneNode. - Updated
@webref/cssto6.10.0.
Release notes
Open source →- Exported the helper libraries from
web.dart. - Deprecated the
helpers.dartlibrary in favor ofweb.dart. - Updated the readme to include usage info and package status.
- Added an example.
- Added event extensions for
WebSocket - Fixes to the return types of the
append()andclone()extension methods onNode. - Deprecated
NodeGlue.appendin favor ofNode.appendChild. - Deprecated
NodeGlue.clonein favor ofNode.cloneNode. - Updated
@webref/cssto6.10.0.
- Exported the helper libraries from
-
0.4.014 Nov 2023Release notes
Open source →- Remove
implements JSObjectfrom all types. This is needed to move the JS types exposed indart:js_interopto extension types. This subtyping will be added back in a future version when we move allpackage:webtypes to extension types. - Add
onMessagegetter toWindowEventGettersextension methods. helpers.dart: expose theEventStreamProvidersclass.- Add
createIFrameElementmethod tohelpers.dart. - Updated types to account for union types.
- Fixed issue where all
JSAnys were treated as nullable. - Changed
JSVoidtovoid. interface mixins are no longer emitted as interfaces. Their members are instead added to the interface that mixes them in.
- Remove
-
0.3.1-dev10 Nov 2023 pre-releaseNothing published for this version
-
0.3.011 Oct 2023Release notes
Open source →- Updated source IDL to
v3.39.1. - Fixed a bug where
typedefs were not declared with the IDL type's nullability. - Types that were aliased to
doubleare now aliased tonum. This is to make it easier for users to pass integer values without going through a cast and to make migration fromdart:htmleasier.
- Updated source IDL to
-
0.2.2-beta27 Sep 2023 pre-releaseRelease notes
Open source →- Updates SDK version minimum to 3.2.0-194.0.dev.
- Removes
isInstanceOfDomTypeasdart:js_interopnow exposesinstanceOfString.
-
0.2.1-beta19 Sep 2023 pre-release -
0.2.0-beta19 Sep 2023 pre-releaseRelease notes
Open source →- Added
helpers.darttop-level library. - Require Dart 3.2 pre-release.
- Update to IDL 3.38.2
- Added
-
0.1.4-beta14 Jun 2023 pre-release -
0.1.3-beta22 May 2023 pre-release -
0.1.2-beta15 May 2023 pre-release -
0.1.1-beta15 May 2023 pre-release -
0.1.0-beta02 May 2023 pre-release -
0.0.131 Jul 2015Nothing published for this version