3 ms·
Seems like a bad idea to me. Mixing data into the html seems messy. The same thing can be achieved just by having the data in javascript data structures, and re
by axod 18y ago
Seems like a bad idea to me. Mixing data into the html seems messy. The same thing can be achieved just by having the data in javascript data structures, and referencing html elements either by ID, or directly.
- Kilimanjaro 18y agoI agree with you 100% Markup, style and data should be separated
- danw 18y agoThe html is the data, this is the correct place for it. The javascript should be behavior and not contain additional data.
- axod 18y agoI disagree. HTML is a specific serialization of the display/UI. Yes it is data, but it should be data related to display. Writing a webapp you don't even really need to use html at all apart from to bootstrap your app. Then you can build the UI yourself instead, which I think ends up as a nicer design and more elegant solution often. (Yes it's not accessible or graceful in terms of degrading)