1
1
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:
Eugene Pankov 2021-06-28 22:21:35 +02:00
parent 1198ede0fd
commit 30a8a8d287
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -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({