Skip to content

obsidian-typings/bridges/modal-bridge

FunctionDescription
bridgeModalExposes the obsidian-typings members of Modal that the mock models under a different name, so production code reading them can be unit-tested. Without this the strict proxy throws on the read rather than returning undefined, which is what made modal.bgEl untestable. bgEl is the dimmed backdrop Obsidian builds as the first containerEl child and registers modal dismissal on, so it is the element any “the user clicked outside the dialog” behavior is about. headerEl is the modal-header wrapper holding titleEl.
unbridgeModal