Skip to content

Commit

Permalink
Add constructor for toggle, input, and change events
Browse files Browse the repository at this point in the history
  • Loading branch information
Atry committed Mar 25, 2019
1 parent d68c549 commit 8a619f3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/scala/com/thoughtworks/binding/LatestEvent.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ class LatestEvent[E <: Event](eventTarget: EventTarget, eventType: String) exten
}

object LatestEvent {
def toggle(eventTarget: EventTarget) = {
new LatestEvent[Event](eventTarget, "toggle")
}
def input(eventTarget: EventTarget) = {
new LatestEvent[Event](eventTarget, "input")
}
def change(eventTarget: EventTarget) = {
new LatestEvent[Event](eventTarget, "change")
}
def abort(eventTarget: EventTarget) = {
new LatestEvent[Event](eventTarget, "abort")
}
Expand Down

0 comments on commit 8a619f3

Please sign in to comment.