4 ms·
We are limited to what is possible in the data dash-* spec. If you have better syntax that's going to work everywhere in every browser please let us know!
by sudodevnull 1y ago
We are limited to what is possible in the data dash-* spec. If you have better syntax that's going to work everywhere in every browser please let us know!
- troupo 1y agoYou literally have a custom Javascript-like DSL already https://data-star.dev/guide/datastar_expressions https://data-star.dev/guide/datastar_expressions This wilful insanity is completely incomprehensible to me (HTMX and lit are also fully infected with it): "Oh no, we are just HTML, we can't do anything" while literally doing tons of things outside of HTML.
- sudodevnull 1y agoWhat's your alternative that stay HTML spec compliant? Instead of whining show code
- troupo 1y ago> What's your alternative that stay HTML spec compliant? Again: you literally have a custom Javascript-like DSL in Datastar. Use that. It's like the "it's just HTML" or "it's HTML-compliant" mantra somehow damages the brain, or something. Edit: this custom JS-like DSL is so prominent and such a crucial part of Datastar, that it's referenced in the very first paragraph of reference: https://data-star.dev/reference https://data-star.dev/reference Oh, look, your HTML-spec-compliant thing in which it is apparently impossible to do anything outside data-* attributes somehow calls external functions, and updates signals, and reads signals, and does all sorts of things: <div data-signals-result> <input data-bind-foo data-on-input="myfunction(el, $foo)" data-on-mycustomevent__window="$result = evt.detail.value" > <span data-text="$result"></span> </div> But no! It's absolutely impossible to do something about data-on-click__window__debounce.500ms.leading