DEV Community

[Comment from a deleted post]
 
gaurav5430 profile image
Gaurav Gupta

yeah, you are right, the paint / rendering operation is asynchronous, but regular dom manipulation is not. I think the manipulation here using execCommand might be asynchronous, which is why you need to wait.