write a pageshow&pagehide event in proprietaryEvent.js