`'complete' == document.readyState` would be better. No need for `===`