Skip to content

Commit

Permalink
Hide the old dynamic event hooks from outside
Browse files Browse the repository at this point in the history
  • Loading branch information
singpolyma committed Jun 19, 2024
1 parent d728d32 commit a564511
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions snikket/EventEmitter.hx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ class EventEmitter {
private var eventHandlers:Map<String,Array<EventHandler>> = [];

private function new() { }

public function on(eventName:String, callback:EventCallback):EventHandler {

@:allow(snikket)
private function on(eventName:String, callback:EventCallback):EventHandler {
var handlers = eventHandlers.get(eventName);
if(handlers == null) {
handlers = [];
Expand Down

0 comments on commit a564511

Please sign in to comment.