tinymce.util.Delay

Utility class for working with delayed actions like setTimeout.

Summary

Methods

Name Summary Defined by

setEditorInterval()

Sets an interval timer that’s similar to native browser setInterval API, except that it checks if the editor instance is still alive when the callback gets executed.

Delay

setEditorTimeout()

Sets a timeout that’s similar to the native browser setTimeout API, except that it checks if the editor instance is still alive when the callback gets executed.

Delay

Methods

setEditorInterval()

setEditorInterval(callback: Function, time: Number): Number

Sets an interval timer that’s similar to native browser setInterval API, except that it checks if the editor instance is still alive when the callback gets executed.

Parameters

  • callback (Function) - Callback to execute when interval time runs out.

  • time (Number) - Optional time to wait before the callback is executed, defaults to 0.

Return value

  • Number - Timeout id number.


setEditorTimeout()

setEditorTimeout(editor: tinymce.Editor, callback: Function, time: Number): Number

Sets a timeout that’s similar to the native browser setTimeout API, except that it checks if the editor instance is still alive when the callback gets executed.

Parameters

  • editor (Editor) - Editor instance to check the removed state on.

  • callback (Function) - Callback to execute when timer runs out.

  • time (Number) - Optional time to wait before the callback is executed, defaults to 0.

Return value

  • Number - Timeout id number.