mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-30 02:54:04 +03:00
added SubscriptionContainer.isEmpty
This commit is contained in:
parent
1198ede0fd
commit
30a8a8d287
@ -11,6 +11,10 @@ export class SubscriptionContainer {
|
||||
private subscriptions: Subscription[] = []
|
||||
private events: CancellableEvent[] = []
|
||||
|
||||
isEmpty (): boolean {
|
||||
return this.events.length === 0 && this.subscriptions.length === 0
|
||||
}
|
||||
|
||||
addEventListener (element: HTMLElement, event: string, handler: EventListenerOrEventListenerObject, options?: boolean|AddEventListenerOptions): void {
|
||||
element.addEventListener(event, handler, options)
|
||||
this.events.push({
|
||||
|
Loading…
Reference in New Issue
Block a user