Store the parent window reference, so that we could unsubscribe from its events on unloaded