#JavaScript: When it comes to breaking up long tasks, the scheduler API seems quite convenient:
await scheduler.yield();
Alas, not supported by Safari yet:
Scheduler API: yield | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.

