Replies: 3 comments 4 replies
-
I think JS is only available in regular HEEx templates. Looking at the docs, you might be able to achieve the same result with CustomEvents as it seems to use that under the hood. Since you're in Svelte in this case, you'll have to do something like this <button on:click={() => CustomEvent("pyro:theme-system", {to: null})}>dark</button> Let me know if that works |
Beta Was this translation helpful? Give feedback.
-
Here is the solution. How could we make this easier with the ~V magic?
|
Beta Was this translation helpful? Give feedback.
-
Is there a way to "run" any sort of Elixir code in ~V strings? Perhaps that would be an escape hatch instead of looking for "{JS." Or does HEEX only support "certain things" as well? |
Beta Was this translation helpful? Give feedback.
-
If I put this in a ~V block:
I get the error at runtime: ReferenceError: JS is not defined
I think I need it to output html like this:
Beta Was this translation helpful? Give feedback.
All reactions