Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose onUnload event stream and ElementStream as a public class #246

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
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 `onUnload` event stream to `ElementEventGetters` extension methods.
- Expose `ElementStream` as a public class.

## 0.5.1

Expand Down
2 changes: 1 addition & 1 deletion lib/src/helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import 'dom.dart';
export 'helpers/enums.dart';
export 'helpers/events/events.dart';
export 'helpers/events/providers.dart';
export 'helpers/events/streams.dart' show EventStreamProvider;
export 'helpers/events/streams.dart' show ElementStream, EventStreamProvider;
export 'helpers/extensions.dart';
export 'helpers/http.dart';
export 'helpers/lists.dart';
Expand Down
3 changes: 3 additions & 0 deletions lib/src/helpers/events/events.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ extension ElementEventGetters on Element {
ElementStream<Event> get onLoad =>
EventStreamProviders.loadEvent.forElement(this);

ElementStream<Event> get onUnload =>
EventStreamProviders.unloadEvent.forElement(this);

ElementStream<Event> get onLoadedData =>
EventStreamProviders.loadedDataEvent.forElement(this);

Expand Down
Loading