My interpretation is that when you apply any change to the DOM the browser has to evaluates / renders it. Generally it is really performant, super fast and almost instant but, in that particular case or often with sizes too, it took a few more milliseconds.
i do't think it should depend on how much time the browser takes. The browser has to model this as a synchronous or async functionality. if it is synchronous, the browser would wait for these changes to be applied before evaluating the next line. if it is asynchronous, then it would always be async and you can't expect it sometimes evaluate the next line in time amd sometimes not.
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
My interpretation is that when you apply any change to the DOM the browser has to evaluates / renders it. Generally it is really performant, super fast and almost instant but, in that particular case or often with sizes too, it took a few more milliseconds.
i do't think it should depend on how much time the browser takes. The browser has to model this as a synchronous or async functionality. if it is synchronous, the browser would wait for these changes to be applied before evaluating the next line. if it is asynchronous, then it would always be async and you can't expect it sometimes evaluate the next line in time amd sometimes not.
sorry what I meant, I interpret the browser painting operations as async (the operations which happen inside the browser, not javascript).
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.