Skip to content

Commit

Permalink
Added method to get event ID
Browse files Browse the repository at this point in the history
  • Loading branch information
duart38 committed Jul 30, 2020
1 parent 00ed66b commit 92310ef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Observe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ export default class Observe<T> {
const success = dispatchEvent(this.currentEvent);
}

/**
* Returns the event ID or type used when dispatching an event.. This can be used if you want to create your own listeners
*/
public getEventID(): string{
return this.eventID;
}

/**
* Stops the current event.
* Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.
Expand Down

0 comments on commit 92310ef

Please sign in to comment.