use postMessage to send event info to parent