2 ms·
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 thing
by wizzwizz4 3y ago
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?
- pjc50 3y ago.. or you accidentally request a layout property: https://gist.github.com/paulirish/5d52fb081b3570c81e3a?ref=alex-macarthur https://gist.github.com/paulirish/5d52fb081b3570c81e3a?ref=a... (updating innerText sounds like an especially lethal trap https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/element_inner_text.cc;l=462-468;drc=d685ea3c9ffcb18c781bc3a0bdbb92eb88842b1b https://source.chromium.org/chromium/chromium/src/+/main:thi... )