Owns the host<->guest postMessage channel for one embedded TeXbrain iframe. Construct with handlers; call pushTheme() on host theme changes, destroy() on unmount.
the iframe's contentWindow (the embedded editor)
the editor's origin (EDITOR_ORIGIN); pinned, never '*'
host hooks (theme/doc/fs/compiled callbacks)
Remove the message listener. Call on iframe unmount.
Push the current host theme to the editor (e.g. on a theme change).
Ask the editor to compile its current buffers now.
Mount a document/project into the editor.
Owns the host<->guest postMessage channel for one embedded TeXbrain iframe. Construct with handlers; call pushTheme() on host theme changes, destroy() on unmount.