Skip to content

Commit aeadff5

Browse files
author
Stanimir Karoserov
committed
event handling names are now DOM2 compatible
1 parent 67d440f commit aeadff5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ui/core/observable.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ export class Observable {
2424

2525
public on: (eventNames: string, callback: (data: EventData) => void) => void;
2626
public off: (eventNames: string, callback?: any) => void;
27-
public addListener: (eventNames: string, callback: (data: EventData) => void) => void;
28-
public removeListener: (eventNames: string, callback?: any) => void;
27+
public addEventListener: (eventNames: string, callback: (data: EventData) => void) => void;
28+
public removeEventListener: (eventNames: string, callback?: any) => void;
2929

3030
// true to track the Changing phase, false otherwise
3131
private _trackChanging = false;
3232

3333
constructor(body?: any) {
34-
this.on = this.addListener = this.addObserver;
35-
this.off = this.removeListener = this.removeObserver;
34+
this.on = this.addEventListener = this.addObserver;
35+
this.off = this.removeEventListener = this.removeObserver;
3636
}
3737

3838
public addObserver(eventNames: string, callback: (data: EventData) => void) {

0 commit comments

Comments
 (0)