Fix #11809: Update text without creating DOM nodes. Close gh-1412.
No ticket: Reduce size by reordering variable declarations. Close gh-1416.