Is it possible to force the browser to perform immediate reflow & repaint from JavaScript, even if there is another code running?
I am rendering a progress bar, everything based on async events so when something loads from server or from cache the DOM updates, but sometimes it is that fast the progress bar stills at i.e. 10% then it is replaced with the regular DOM document.
I tried all that tricks with display/visibility none/hidden, getComputedStyle, requestAnimationFrame but nothing forces the browser to do a real repaint. It probably flushes the queue and applies all the changes but no real repaint to screen occurs.