Auto-convert WebApp to Desktop app via embedding

It would seem a fairly trivial task to have a button in the IDE to convert a Web App to a Desktop App. I have seen Microsoft demonstrations of this with Visual Studio. I know it results in a kludge of an application and would probably not be accepted in any Store, but may be useful for many users deciding whether to choose to create a Desktop or Web app (or both) by creating a Web 2.0 app only, and of course Xojo marketing.

The procedure is:

  1. Create a working, standalone Web App. Compile and install as required.

  2. In the IDE click the ‘Convert to Desktop WebApp’ button

  3. The IDE creates a new Desktop app with a similar name as the web app with a single window containing a single HTMLViewer

  4. The IDE auto-embeds a compiled version of the WebApp as a Helper app

  5. The IDE creates an App.Open Event that runs the embedded Helper WebApp on a free port and points the HTMLViewer to this local URL

  6. Compile the Desktop app and run/distribute as required

Would this work? Progressive Web Apps via Xojo?