Make DOM manipulation wait until layout's complete, and implement a textContent setter.