Plugin dialog content is injected with SetPage, so the webview's current URL
stays the base URL and the injected document has none of its own. Reloading the
page (context menu or keyboard shortcut) therefore re-fetches the base URL and
the plugin UI disappears, permanently: load_plugin_content() returned early once
m_content_loaded was set.
Re-inject the plugin HTML whenever a main-frame load arrives after the initial
swap. m_own_page_load marks the load caused by our own SetPage so it is not
mistaken for a reload, and in-document navigation is ignored: the MSW backend
synthesises a wxEVT_WEBVIEW_LOADED when a page changes location.hash, which
would otherwise wipe the page under the user. A post-load error is left alone
too, as it only ever means a failed subresource.
wx 3.3.2 delivers webview script messages synchronously inside the native
callback on GTK and macOS, so script plugins run with the plugins-dialog
webview's signal/delegate frame on the stack. Creating and presenting the
orca.host.ui window from there crashed on Linux at Raise() --
gtk_window_present while GTK's deferred show was still in flight.
Defer the whole window creation to a CallAfter with a pre-bound registry
handle (post/close stay FIFO-safe, teardown races become a no-op), and
drop Raise() plus the show_modeless_dialog wrapper: Show() already
activates and fronts a new window on every platform.