write a readystatechange event in proprietaryEvent.js