fix(lifecycle-component): support 'once' option for event listeners

This commit is contained in:
2025-05-31 22:18:34 +00:00
parent 96c4de0f8a
commit e0f3e8a0ec
3 changed files with 26 additions and 8 deletions

View File

@ -55,8 +55,8 @@ class TestComponent extends LifecycleComponent {
return this.clearInterval(timer);
}
public testAddEventListener(target: any, event: string, handler: Function): void {
return this.addEventListener(target, event, handler);
public testAddEventListener(target: any, event: string, handler: Function, options?: { once?: boolean }): void {
return this.addEventListener(target, event, handler, options);
}
public testIsShuttingDown(): boolean {