4 ms·
Wait, do you mean this custom nonstandard poorly specified DSL? https://html.spec.whatwg.org/multipage/dom.html#attr-data- https://html.spec.whatwg.org/multipag
by peteforde 3y ago
Wait, do you mean this custom nonstandard poorly specified DSL? https://html.spec.whatwg.org/multipage/dom.html#attr-data- https://html.spec.whatwg.org/multipage/dom.html#attr-data-*
What you're showing above is 100% standards HTML 5. Data attributes have been a thing since 2008 or perhaps slightly earlier.
You might not love the look of it, but the markup above is something that your browser understands without interpretation. You can turn off JS and it will render without any issue whatsoever.
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data- https://developer.mozilla.org/en-US/docs/Web/HTML/Global_att...*
This is very different from tooling that uses alternative, non-HTML syntax. Our browsers might be written to be absurdly tolerant of broken markup, but that doesn't mean that Vue/HTMX/Alpine/CFML templates aren't proprietary.
- arcanemachiner 3y agoFWIW I'm pretty sure Alpine can be configured to require `data-` as a prefix for its tags, e.g. `data-x-click="handleClick"`.
- troupo 3y ago> What you're showing above is 100% standards HTML 5. Data attributes have been a thing since 2008 or perhaps slightly earlier. So, which part of these is standardized and non-custom: keydown.esc->modal#close content-loader-url-value content-loader-refresh-interval-value > This is very different from tooling that uses alternative, non-HTML syntax. Ah yes. Pure HTML syntax of `keydown.esc->modal#close`
- peteforde 3y agoYou appear to be confused. If you look in the specification I linked to, what you're hung up on is known as a "value". It can be any valid characters required by your application.
- troupo 3y ago> You appear to be confused. If you look in the specification I linked to, what you're hung up on is known as a "value". Of course I'm not confused. You're hung up on the little insignificant part that `x="y"` is a HTML attribute and pretend that this immediately makes it standart non-weird DSL. Funnily enough you share this with proponents of some other frameworks like lit. "But we use HTML attributes here's an MDN link" > It can be any valid characters required by your application. Indeed. So let's look at those characters, shall we. First it's the literal "proprietary syntax to inject janky control structure" that you complain about. Funily enough you're ignoring this when I'm pointing it out: click->gallery#next keydown.ctrl+a->listbox#selectAll resize@window->gallery#layout click->gallery#open:capture scroll->gallery#layout:!passive Second, you have a literal custom DSL composed of data-attributes. # Passing params to events data-[controller-name]-[param-name]-param # "Targets". All elements will be put into an array in [field-name] data-[controller-name]-target="[field-name]" # "Outlets" because you need a different name for references # to instances of other classes data-[controller-name]-[field-name]-outlet # Data binding. Much like Vue, it requires a specific # structure of values present in your code data-[controller-name]-[value-name]-value # An additional data binding for CSS classes # that are also specified separately data-[controller-name]-[css-class-name]-value But zealots are completely blind to the fact that they also have a non-standard badly specified hacky DSL because "but we use HTML attributes".
- peteforde 3y agoYou can say this as many times as you want, but you're factually incorrect and conceptually misguided. HTML attributes were literally created to do the exact thing that you seem to think is a smoking gun.
- troupo 3y ago> but you're factually incorrect I've provided the actual facts that you ingored > HTML attributes were literally created to do the exact thing that you seem to think is a smoking gun. 1. You complain, and I quote, "proprietary syntax to inject janky control structure". What's this then: click->gallery#next keydown.ctrl+a->listbox#selectAll resize@window->gallery#layout click->gallery#open:capture scroll->gallery#layout:!passive 2. Do read up on what DSL means. The fact that you're using custom tags to implement it don't make any less of a DSL, and any less of a proprietary syntax. Though... You know what? Don't bother. Zealots are blind. Adieu.