Replies: 2 comments 1 reply
-
|
JSON demands that property names be enclosed in quotation marks. There's nothing strange about it. It's in the definition of JSON itself. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
With some consideration, I think there actually shouldn't be any listeners. It's XSS-prone. If you send a custom component tag from the server, you have to explicitly register it in the frontend, which seems reasonable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I'm trying to get raw HTML from a Svelte component to use with Elysia to return HTML from routes.
I see two ways:
svelte/serverThe first option works with event listeners. However, I don't understand how to pass props to the components this way.
`<props-element options="[{value:2},{value:5}]"></props-element>`The second option has
propsattribute in the config:But doesn't preserve event listeners. It seems to completely remove
on...attributes.Update: It seems I wasn't complying with
JSON.parse:Seems strange to use these stringify shenanigans though.
Beta Was this translation helpful? Give feedback.
All reactions