DEV Community

[Comment from a deleted post]
 
daviddalbusco profile image
David Dal Busco

sorry what I meant, I interpret the browser painting operations as async (the operations which happen inside the browser, not javascript).

 
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.