News for hackers. Stuff that matters.
Re:The Truth about Svelte by lucideer on Wednesday July 12, 2023 @11:26AM (#36695967)
> which the compiler picks up

I think this is the cruz of the gp's question. The browser doesn't support explicit behaviours for "on:click" or "|once" (the "$" label is a cool trick I'd forgive the gp for not recognising as native JS) - it may be "valid" HTML but it's not "just HTML" (nor just JS), it's a DSL.

Re:The Truth about Svelte by ttfkam on Thursday July 13, 2023 @05:25PM (#36716204)
It does support onclick though. This isn't a far off derivation. Also "|once" is a whole lot cleaner and more terse than the "once" variant of addEventListener, to be sure.

Anyone who already knows HTML and native event handling could pick this up in less than 5 minutes. Good enough.