PluginSettingsComponentBase.once method
PluginSettingsComponentBase › once
Trigger an event, executing all the listeners in order even if some of them throw an error.Add an event listener that will be called only once.
Signature:
once(name: EventName, callback: (...$arguments: Arguments) => Promisable<void>, thisArgument?: unknown): AsyncEventRefParameters:
| Parameter | Type | Description |
|---|---|---|
| name | EventName | The name of the event. |
| callback | (...$arguments: Arguments) => Promisable<void> | The callback to call when the event is triggered. |
| thisArgument? | unknown | The context passed as this to the callback. |
Returns: AsyncEventRef — A reference to the event listener.
Remarks:
Not refactored to parameter-object pattern, to keep the parity withobsidian#Events#on (or once, correspondingly).