Please also move this into the callback. With the current code, the node will be inserted and then we'll change the textContent. That could trigger two reflows.