diff --git a/web/CHANGELOG.md b/web/CHANGELOG.md index 2e9df212..28c66938 100644 --- a/web/CHANGELOG.md +++ b/web/CHANGELOG.md @@ -6,6 +6,8 @@ - Fixed generation of variadic arguments to generate 4 optional parameters. - Removed all `@Deprecated` members. - Added `URL.toDart` and `Uri.toJS` extension methods. +- Added missing `Document` and `Window` pointer event getters: `onDrag*`, + `onTouch*`, `onMouse*`. ## 1.1.1 diff --git a/web/lib/src/helpers/events/events.dart b/web/lib/src/helpers/events/events.dart index 6a966696..ab312ced 100644 --- a/web/lib/src/helpers/events/events.dart +++ b/web/lib/src/helpers/events/events.dart @@ -277,8 +277,121 @@ extension WindowEventGetters on Window { Stream get onPopState => EventStreamProviders.popStateEvent.forTarget(this); + Stream get onTouchCancel => + EventStreamProviders.touchCancelEvent.forTarget(this); + + Stream get onTouchEnd => + EventStreamProviders.touchEndEvent.forTarget(this); + + Stream get onTouchEnter => + EventStreamProviders.touchEnterEvent.forTarget(this); + + Stream get onTouchLeave => + EventStreamProviders.touchLeaveEvent.forTarget(this); + + Stream get onTouchMove => + EventStreamProviders.touchMoveEvent.forTarget(this); + + Stream get onTouchStart => + EventStreamProviders.touchStartEvent.forTarget(this); + + Stream get onMouseDown => + EventStreamProviders.mouseDownEvent.forTarget(this); + + Stream get onMouseEnter => + EventStreamProviders.mouseEnterEvent.forTarget(this); + + Stream get onMouseLeave => + EventStreamProviders.mouseLeaveEvent.forTarget(this); + + Stream get onMouseMove => + EventStreamProviders.mouseMoveEvent.forTarget(this); + + Stream get onMouseOut => + EventStreamProviders.mouseOutEvent.forTarget(this); + + Stream get onMouseOver => + EventStreamProviders.mouseOverEvent.forTarget(this); + + Stream get onMouseUp => + EventStreamProviders.mouseUpEvent.forTarget(this); + + Stream get onDrag => + EventStreamProviders.dragEvent.forTarget(this); + + Stream get onDragEnd => + EventStreamProviders.dragEndEvent.forTarget(this); + + Stream get onDragEnter => + EventStreamProviders.dragEnterEvent.forTarget(this); + + Stream get onDragLeave => + EventStreamProviders.dragLeaveEvent.forTarget(this); + + Stream get onDragOver => + EventStreamProviders.dragOverEvent.forTarget(this); + + Stream get onDragStart => + EventStreamProviders.dragStartEvent.forTarget(this); +} + +extension DocumentEventGetters on Document { + Stream get onTouchCancel => + EventStreamProviders.touchCancelEvent.forTarget(this); + + Stream get onTouchEnd => + EventStreamProviders.touchEndEvent.forTarget(this); + + Stream get onTouchEnter => + EventStreamProviders.touchEnterEvent.forTarget(this); + + Stream get onTouchLeave => + EventStreamProviders.touchLeaveEvent.forTarget(this); + Stream get onTouchMove => EventStreamProviders.touchMoveEvent.forTarget(this); + + Stream get onTouchStart => + EventStreamProviders.touchStartEvent.forTarget(this); + + Stream get onMouseDown => + EventStreamProviders.mouseDownEvent.forTarget(this); + + Stream get onMouseEnter => + EventStreamProviders.mouseEnterEvent.forTarget(this); + + Stream get onMouseLeave => + EventStreamProviders.mouseLeaveEvent.forTarget(this); + + Stream get onMouseMove => + EventStreamProviders.mouseMoveEvent.forTarget(this); + + Stream get onMouseOut => + EventStreamProviders.mouseOutEvent.forTarget(this); + + Stream get onMouseOver => + EventStreamProviders.mouseOverEvent.forTarget(this); + + Stream get onMouseUp => + EventStreamProviders.mouseUpEvent.forTarget(this); + + Stream get onDrag => + EventStreamProviders.dragEvent.forTarget(this); + + Stream get onDragEnd => + EventStreamProviders.dragEndEvent.forTarget(this); + + Stream get onDragEnter => + EventStreamProviders.dragEnterEvent.forTarget(this); + + Stream get onDragLeave => + EventStreamProviders.dragLeaveEvent.forTarget(this); + + Stream get onDragOver => + EventStreamProviders.dragOverEvent.forTarget(this); + + Stream get onDragStart => + EventStreamProviders.dragStartEvent.forTarget(this); } extension ElementCustomEvents on Element {