use events for cross window communication