A simple solution for detecting the ready state of the browser's document