Skip to content

Commit 57ce8b4

Browse files
committed
try new shims
1 parent 794cd9f commit 57ce8b4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

eventcontext.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ namespace context {
2121
public flags: number
2222
) { }
2323

24+
private myHandler: () => void = undefined
25+
2426
register() {
25-
control.onEvent(this.src, this.value, () => {
27+
this.myHandler = () => {
2628
if (this.handler) this.handler();
27-
}, this.flags)
29+
}
30+
control.rawOnEvent(this.src, this.value, this.myHandler, this.flags)
2831
}
2932

3033
unregister() {
31-
control.onEvent(this.src, this.value, doNothing, this.flags);
34+
control.rawUnregisterEvent(this.src, this.value);
3235
}
3336
}
3437

0 commit comments

Comments
 (0)