With a web extension it's possible to communicate with a native application using runtime.connectNative(), my idea is to flip that around so a native application could launch Firefox with the --connectNative command line parameter and FF effectively becomes a WebView for that application:
$ firefox --connectNative /home/weave/main.html
The native app's UI is HTML/CSS/JS which FF retrieves using the file protocol and communication between the native app and FF is still stdin/stdout just as it would be if it were an extension.