Skip to content

EventRefDisposable

A DisposableEx that unregisters an Obsidian EventRef on dispose, via the event source exposed on the ref itself (eventRef.e).

Import:

import { EventRefDisposable } from '@mnaoumov/obsidian-lib/events';

Signature:

export class EventRefDisposable extends DisposableBase

Extends: DisposableBase

Constructor

new EventRefDisposable(eventRef: EventRef)

Creates a disposable wrapping an existing EventRef.

Methods

MethodReturnsDescription
performDispose()voidUnregisters the event via the source stored on the ref (eventRef.e.offref).