The issue was due to a difference in readyState propert between Firefox and Chrome, as in Chrome readyState seems to be always complete, there was a little delay in Firefox. So this should be handled by an event listener on readySate change, but it was by a sort of "retry 10 times" called with a setTimeOut. As in Firefox the readyState was still not 'complete' after 10 retries, the message was never displayed correctly.
In general case, setTimeOut should never be used to deal with DOM changes.
NB: Rendering also when readyState is equal to interactive seems to fasten the rendering in Firefox, I don't know if there is any reason to only rely on complete.
Thanks @aenario to review this PR :)
The issue was due to a difference in readyState propert between Firefox and Chrome, as in Chrome readyState seems to be always complete, there was a little delay in Firefox. So this should be handled by an event listener on readySate change, but it was by a sort of "retry 10 times" called with a setTimeOut. As in Firefox the readyState was still not 'complete' after 10 retries, the message was never displayed correctly.
In general case, setTimeOut should never be used to deal with DOM changes.
NB: Rendering also when readyState is equal to
interactive
seems to fasten the rendering in Firefox, I don't know if there is any reason to only rely oncomplete
.