Please try document.getElementById("box").style.whiteSpace="pre" with the console.
Or edit CSS directly via DevTools (F12), by adding white-space: pre; to #box.
Vertical scrollbar does not appear in Chrome 70.
* See also: tc.html Chrome bug 9
* This page is related to Issue 904049.