Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Only if you yield to the layout engine (e.g. `await new Promise(resolve => setTimeout(resolve, 0))`) in between. Which, if you know you want to change two things, why would you?


.. or you accidentally request a layout property: https://gist.github.com/paulirish/5d52fb081b3570c81e3a?ref=a...

(updating innerText sounds like an especially lethal trap https://source.chromium.org/chromium/chromium/src/+/main:thi... )




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: