Is there a way to force the browser to render DOM changes during the execution of JavaScript? In the following example, only the '1000' will be displayed and I do understand that this is caused by having only a single thread processing the JavaScript executing but I was wondering if there is a way to force the browser to render each DOM change?
Example:
var el = document.getElementById("#fixup"),
i;
for (i = 1; i <= 1000; i++) {
// can i force this DOM update to the rendered?
el.innerHTML = i.toString());
}