4 ms·
There's no custom syntax, they only use existing HTML language features, namely element attributes. Custom syntax would be something that is not already a synta
by tlamponi 5y ago
There's no custom syntax, they only use existing HTML language features, namely element attributes. Custom syntax would be something that is not already a syntax, i.e., language feature, in HTML.
And why exactly should this not be checkable at build time?
The attributes are defined, their use too, it's as checkable as any JavaScript framework.
If you're using TypeScript, or the like, then you'll naturally get much more things that can be checked, but those are type checks and not syntax checks, i.e., something completely different.
Don't get me wrong, personally I'm all for static typed, and schematic frameworks but that's completely orthogonal to using (custom) HTML attributes, and has nothing to do with syntax checks. I mean, if syntax could not be checked it couldn't be parsed at all...
- flowerlad 5y agoThis looks like custom syntax to me: x-for="post in posts" You can argue that this is just an HTML attribute, so it is existing syntax. But it appears to be a way of looping through items in a collection, and as such it is neither HTML nor JavaScript, and therefore it is a custom syntax. It is not checkable at build time if there is no checker available.