Hello,
I’m exploring the possibility of displaying Hype documents within a mobile web app (aka PWA).
For the construction of the web app, I am using a promising new PWA visual builder for Mac called Thorium Builder (https://www.thoriumbuilder.com)
I think the combination of Thorium Builder with Tumult Hype could be a winning bet. Both products allow an easy visual construction with the option to extend their functionality through javascript. I think Thorium Builder is worth a serious look.
Let me explain the issue I have right now.
PWAs or web apps created with Thorium Builder are Single Page Application (SPA). It means that when the web app is loaded from its URL, then the index page and the related components (css, js, etc…) are loaded as well. When users open another page, then the page code is loaded dynamically and added to the DOM on top of the mainView (the Index page). All the Js and CSS files loaded by the index page are available for all the pages of the project.
In the Thorium Builder platform, if I add the standard call to a Hype document (div, script…) within index.html, everything works as expected.
But, If you do the same call in any of the rest of html pages (which are dinamically generated and then added to the DOM of the web app), then nothing is displayed.
I must say that an alternative that does work is to call the Hype document using an iframe. However, I would prefer to use a more direct call in order to facilitate data exchange between the Hype document and the web app.
I consulted this issue with the developers of Thorium Builder and they told me the following:
“I tried quickly with one of their example, and indeed got the same issue. As I was saying before, it looks like it is not loaded when using it with a dynamic generated page (and once again all TB pages other than the index page are dynamically generated and added to the DOM). I have had such issues with other components already, and the way to fix it was to use an “Initialisation” script when it was available. I just made a search, but didn’t found anything about it for Tumult Hype, but maybe the best thing to do should to ask them if there is a way to load an Tumult Hype layout dynamically in the DOM when a page is generated dynamically, I mean maybe there is an existing function like hype.initialise() or something like that?”
I would be very grateful if you could indicate possible solutions or ideas to address this issue and achieve a smoothly integration of Hype documents in web apps designed with Thorium Builder. I’m sure many Hype users would find it interesting.
I remain at your disposal to further clarify any point in the text.
Thank you very much.