From 426faf799348bc8952c6a549c635215e5cd0d568 Mon Sep 17 00:00:00 2001 From: Kenzie Davisson <43759233+kenzieschmoll@users.noreply.github.com> Date: Tue, 28 May 2024 13:04:25 -0700 Subject: [PATCH 1/3] Expose `onUnload` event stream. --- lib/src/helpers/events/events.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/helpers/events/events.dart b/lib/src/helpers/events/events.dart index 643aadb2..82c529fc 100644 --- a/lib/src/helpers/events/events.dart +++ b/lib/src/helpers/events/events.dart @@ -106,6 +106,9 @@ extension ElementEventGetters on Element { ElementStream get onLoad => EventStreamProviders.loadEvent.forElement(this); + ElementStream get onUnload => + EventStreamProviders.unloadEvent.forElement(this); + ElementStream get onLoadedData => EventStreamProviders.loadedDataEvent.forElement(this); From 3b195b27ff05b2e0e8e691715977f0e1b495db7f Mon Sep 17 00:00:00 2001 From: Kenzie Davisson <43759233+kenzieschmoll@users.noreply.github.com> Date: Tue, 28 May 2024 20:06:31 +0000 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0dc268a..f384ed6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ 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. ## 0.5.1 From 7488ca2815dc1986217036b60ac71be739f61c42 Mon Sep 17 00:00:00 2001 From: Kenzie Davisson <43759233+kenzieschmoll@users.noreply.github.com> Date: Tue, 28 May 2024 20:23:44 +0000 Subject: [PATCH 3/3] Expose `ElementStream` --- CHANGELOG.md | 1 + lib/src/helpers.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f384ed6f..4dd0a096 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ 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 diff --git a/lib/src/helpers.dart b/lib/src/helpers.dart index 9f10380b..2fcec3bd 100644 --- a/lib/src/helpers.dart +++ b/lib/src/helpers.dart @@ -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';