Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AddRemoveEventListenerJs in TPS #202

Open
milesfrain opened this issue Aug 8, 2020 · 4 comments
Open

Fix AddRemoveEventListenerJs in TPS #202

milesfrain opened this issue Aug 8, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@milesfrain
Copy link
Collaborator

Can fix by moving index.html content to .purs.

@milesfrain milesfrain added the bug Something isn't working label Aug 8, 2020
@JordanMartinez
Copy link
Owner

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.

@milesfrain
Copy link
Collaborator Author

That proposal is tracked in purescript/trypurescript#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.

@JordanMartinez
Copy link
Owner

Let's leave the fixme status and wait until a fix is applied upstream.

@milesfrain
Copy link
Collaborator Author

Add PS code to generate the same HTML content.

This is looking more within reach. See GroceriesJs in #210 for an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants