Use readystatechange event

Improves #88 by binding to ``readystatechange`` event and observing ``document.readyState``