7 ms·
Does anyone else feel that a site called "You Might Not Need Javascript", probably shouldn't use Javascript?
by jwblackwell 10y ago
Does anyone else feel that a site called "You Might Not Need Javascript", probably shouldn't use Javascript?
- akerro 10y agoNo?
- kitd 10y agoPerhaps they needed Javascript ;)
- deleted 10y ago[deleted]
- fenomas 10y agoDo any of the examples use Javascript? Or are you saying the site shouldn't use JS for syntax highlighting or whatever, even though that's not the sort of thing it claims JS isn't needed for?
- Retr0spectrum 10y agoIf you look at the source, there are plany of JS files being loaded. Mostly from codepen, but also from the site itself. I don't see any features of this site which should require javascript, so they should probably "practise what they preach".
- 9point6 10y agoTechnically, they're preaching that you might not need JavaScript rather than advocating against it
- eyelidlessness 10y agoWhy would syntax highlighting need JavaScript?
- marxidad 10y agoThe browser doesn't natively support syntax highlighting (they aren't features of HTML or CSS).
- eyelidlessness 10y agoIt depends what you mean by "support". There are two things a JavaScript syntax highlighter is doing: 1. Classify each token (whether this is building up an AST or doing something more fuzzy/clever is immaterial for this discussion); 2. Construct a DOM tree (HTML) that is styled (CSS). Step 1 does not have to happen client-side at all. Step 2 doesn't require JavaScript at all.
- xigency 10y agoThat hardly makes sense. Changing the color of text is definitely a feature of HTML and CSS. What's the lazy reason for not rendering that before serving the html page.
- deviate_X 10y agoYes?
- vidarh 10y agoDepends on what it uses it for. It says you "might not" need it, not that you won't need it.
- dingo_bat 10y agoI blocked all js on the page and the examples just disappeared. I could just see the undecorated code snippets.
- crashdown 10y agoThis website does not need JavaScript. It's progressively enhanced with it.
- marrs 10y agoMaybe?
- bo1024 10y agoI was reading it with javascript disabled and very confused - are there only code snippets and no visualization of the examples? After reading your comment, I went back and enabled javascript and now can see the examples.