2018-04-02 07:34:16 +02:00

7 lines
154 B
TypeScript

export function requestIdleCallback(func: Function) {
if("requestIdleCallback" in window) {
window["requestIdleCallback"](func)
} else {
func()
}
}