CKEDITOR.tools Class
src/core/tools.js:4
CKEDITOR.tools class utility which adds additional methods to those of CKEditor.
Methods
debounce
-
callback
-
timeout
-
context
-
args
Debounce util function. If a function execution is expensive, it might be debounced. This means that it will be executed after some amount of time after its last call. For example, if we attach a a function on scroll event, it might be called hundreds times per second. In this case it may be debounced with, let's say 100ms. The real execution of this function will happen 100ms after last scroll event.
Parameters:
-
callback
FunctionThe callback which has to be called after given timeout.
-
timeout
NumberTimeout in milliseconds after which the callback will be called.
-
context
ObjectThe context in which the callback will be called. This argument is optional.
-
args
ArrayAn array of arguments which the callback will receive.
merge
-
objects
Returns a new object containing all of the properties of all the supplied objects. The properties from later objects will overwrite those in earlier objects.
Passing in a single object will create a shallow copy of it.
Parameters:
-
objects
Object multipleOne or more objects to merge.
Returns:
A new merged object.
simulate
-
element
-
event
Simulates event on a DOM element.
Parameters:
-
element
DOMElementThe element on which the event shoud be simualted.
-
event
StringThe name of the event which have to be simulated.