changed tab event to postmessage