Threading requirements are part of the product surface because the native dialog APIs are not uniform across platforms.
The default managed path routes calls through INativeMessageBoxHost. By default, NativeMessageBoxClient selects a runtime-backed host for native targets and a browser host when running in the browser.
NativeMessageBoxHostOptions exposes the main default-host knobs:
RequireStaThreadForWindows| Platform | Requirement |
|---|---|
| Windows | Advanced dialogs may require STA |
| macOS | Main-thread execution |
| Linux | GTK-compatible UI context |
| iOS | Main-thread presenter |
| Android | UI-thread activity presentation |
| Browser | Main-thread overlay flow |
Implement INativeMessageBoxHost when you need: