Facilitates tracking of asynchronous jobs.
Notifies that a job has finished. The specified job id is removed and the callback stored when the job was started is returned.
The job id
The function stored when the job was started
const jobId = editor.jobs.start(() => console.log('job was finished'));editor.jobs.finish(jobId)(); // prints 'job was finished' Copy
const jobId = editor.jobs.start(() => console.log('job was finished'));editor.jobs.finish(jobId)(); // prints 'job was finished'
Adds a new job. The specified function will be returned when the job is finished.
A function to be stored for this job.
Returns a job id
Facilitates tracking of asynchronous jobs.