DEV Community

Substituting JavaScript with HTML

EDDYMENS on October 25, 2017

So probably by now you are thinking of how in the world will HTML ever substitute Javascript. Well I didn’t mean it literally. But then in some ...
Collapse
 
lexlohr profile image
Alex Lohr

So you replaced 8 Scripts with one generic script and changed HTML. Good job, congratulations. Still, that doesn't mean that you actually replaced JS with HTML.

The other way around also works: write your page in vanilla HTML/CSS, with no JS at all and make it work. Now use JS to enrich your customer's experience. Now you switched your development pattern from graceful degradation to feature enhancement.

Collapse
 
eddymens profile image
EDDYMENS • Edited

I actually enjoy the second approach more. Unfortunately, its much harder to package that up as a tool as its something best taught. In the case of the above the end goal was to have a tool that covered both vanilla HTML/CSS and considered the experience all as one.