mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-02 02:23:12 +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 subscriptions: Subscription[] = []
|
||||||
private events: CancellableEvent[] = []
|
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 {
|
addEventListener (element: HTMLElement, event: string, handler: EventListenerOrEventListenerObject, options?: boolean|AddEventListenerOptions): void {
|
||||||
element.addEventListener(event, handler, options)
|
element.addEventListener(event, handler, options)
|
||||||
this.events.push({
|
this.events.push({
|
||||||
|
Loading…
Reference in New Issue
Block a user