Back to Trilium

Class default

docs/Script API/classes/Frontend_Script_API._internal_.default-3.html

0.102.22.0 KB
Original Source

Class default

Index

Constructors

constructor

Methods

allowUpdateWithoutChangeisAllSavedAndTriggerUpdateresetUpdateTimerscheduleUpdatetriggerUpdateupdateNowIfNecessary

Constructors

constructor

new default(updater: Callback, updateInterval?: number): default

Parameters

  • updater: Callback
  • updateInterval: number = 1000

Returns default

Methods

allowUpdateWithoutChange

allowUpdateWithoutChange(callback: Callback): Promise<void>

Parameters

  • callback: Callback

Returns Promise<void>

isAllSavedAndTriggerUpdate

isAllSavedAndTriggerUpdate(): boolean

Returns boolean

resetUpdateTimer

resetUpdateTimer(): void

Normally () would actually trigger the update only once per updateInterval. If the method is called 200 times within 20s, it will execute only 20 times. Sometimes, if the updates are continuous this would cause a performance impact. Resetting the time ensures that the calls to triggerUpdate have stopped before actually triggering an update.

Returns void

scheduleUpdate

scheduleUpdate(): void

Returns void

triggerUpdate

triggerUpdate(): void

Returns void

updateNowIfNecessary

updateNowIfNecessary(): Promise<void>

Returns Promise<void>

Settings

Member Visibility

  • Protected
  • Inherited
  • External

ThemeOSLightDark

On This Page

Constructors constructor Methods allowUpdateWithoutChangeisAllSavedAndTriggerUpdateresetUpdateTimerscheduleUpdatetriggerUpdateupdateNowIfNecessary