purescript-cookbook
purescript-cookbook copied to clipboard
Fix AddRemoveEventListenerJs in TPS
I'm not sure that that would be the best fix. It would increase the complexity of the recipe, and I'm not sure whether that would be worth it. The issue is that the end-user doesn't control what the index.html file is in the iframe. What if that limitation was removed? For example, JsFiddle has HTML, CSS, and JS. Right now, we're only doing the JS side of things. I wouldn't want to support CSS because one can add that via the HTML, but adding the HTML would help.
That proposal is tracked in https://github.com/purescript/trypurescript/issues/8 But that would take a lot of time and work to set up.
In the meantime we could either:
- Add PS code to generate the same HTML
<body>content. I believe this is possible, although I've never done this outside of a framework. Might be nice to include another recipe just to demonstrate this capability. - Flag recipe as unsupported in TPS.
- Leave the fixme status, and wait for HTML editing in TPS.
Let's leave the fixme status and wait until a fix is applied upstream.
Add PS code to generate the same HTML
content.
This is looking more within reach. See GroceriesJs in #210 for an example.