Set window only after iframe loaded