I see. I don’t think this is getting at what you want. You’re delaying a blocking operation until later, which is different than yielding so that any pending UI updates can be applied.
I’d suggest making a bunch of DOM changes, then setTimeout to flush the pending DOM updates.