Very interesting. : )
Happy to share research for PWA "proof of purchase" solutions.
Following what @leafo directed, we reviewed the core issues of iframe security with "Same-Origin Policy" and "Cross-Window communication" And found a few links:
Here is one that describes the context the best:
Part of the solution may be postMessage:
Another part might be "a PWA enabled wrapper"?
Where the wrapper listens to either: "beforeinstallprompt" or (probably) a postMessage from the parent.
We see similar solution elsewhere with ADs in iFRAMES - allowing App Install Buttons. And we think that (among some other things) is why big companies adopted PWA uniformly and made big moves quietly.
The event name is confusing: "beforeinstallprompt". It is triggered "after Web App Manifest is validated". So we find that no manifest, means no "beforeinstallprompt event. The handler usually creates the "Add to Homescreen" button and the listener for when it is clicked, also a handler if the user installed or canceled. The name of the event, refers to a CONFIRM PROMPT that appears, as a standard, to allow user confirm the install of the app. That is why the event is strangely named 'beforeinstallprompt' - even thought it is fired "after manifest". Best doc on it is here: https://developers.google.com/web/fundamentals/app-install-banners/. Hope it helps.
We think a paywall will be really good for Episodic InteractiveFiction Adventure Novels - like Beast! We love it! We installed and will be fans of other products! : )
Happy to test iFrame solutions, and build rapid prototypes. Because we probably all gain from the experience.
Also if it interests you @adventuron, we will try to experiment with PWA paywall, using itch.io serverside options on node:
https://itch.io/docs/api/serverside Which asks server, "has user paid for product?" Yes? Serve PWA. No? Serve Gallery. PWA-Itch.io Server, with episodic push updates? Sounds cool to us! : )
"Run Game Redirect" - to PWA URL is also good. As @adventuron suggests. We would like to know more.
Itch.io might be the first (and best) to offer such a thing. We'd like to use itch.io PWA to deliver reliable and fast episodic content. Perhaps similar to @adventuron - we need a flexible paywall. One thing is clear, leading voices echo PWA is the future, and the big movers have already moved (awaiting Web App Manifest in iOS and [Push API](https://developer.mozilla.org/en-US/docs/Web/API/Push_API) ) - and is IN PROGRESS. At time of writing - "proof of purchase" is a missing piece. Sorry for interrupting. Happy to help. : )