Idle decorators

Wrap function in [[Async.requestIdleCallback]] wrapper

import { component, idle } from 'jodit/src/core/decorators';
import { UIElement } from 'jodit/src/ui';

class SomeClass extends UIElement {
runIdle(): void {
// Do some havy work
this.runIdle(); // This will work and won't go into stack depth error and break the main thread



Jodit PRO

If you like Jodit - try Jodit PRO