add type to the data passed from iframe to upper level window