Skip to content

components/all-windows-event-component

Handles registering DOM events and handlers for all windows (main window and all existing/future popup windows) and their documents.

Obsidian workaround popout-event-relay-partial, seen in Obsidian 1.15.1: core copies only a fixed set of event types from a popout to the main window, and none to the main document, so a listener on the main window misses the rest. Its canary is in core-popout-relay.desktop.obsidian.integration.test.ts.

Class Description
AllWindowsEventComponent Handles registering DOM events and handlers for all windows (main window and all existing/future popup windows) and their documents.
Interface Description
AllWindowsEventComponentRegisterAllDocumentsDomEventParams Parameters for AllWindowsEventComponent.registerAllDocumentsDomEvent.
AllWindowsEventComponentRegisterAllWindowsDomEventParams Parameters for AllWindowsEventComponent.registerAllWindowsDomEvent.
ForEachWindowParams Parameters for forEachWindow.
Function Description
forEachWindow Applies a handler to the main window immediately and to existing and future popouts after layout ready. Cleanup runs when each window closes or the owning component unloads.