Idle decorators

Wrap function in [[Async.requestIdleCallback]] wrapper

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

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

Index

Functions

Jodit PRO

If you like Jodit - try Jodit PRO