Hacker News new | past | comments | ask | show | jobs | submit login

It's not a single HTML file though. On line 1211 jQuery is pulled, and on lines 57 and 64 an external font file is referenced.

I am not sure having everything in a single HTML file is any feat though. You can of course compress all your JS deps and CSS to a single HTML file, but it's not very cache efficient if your content is dynamic on the HTTP level.

Targeting raw DOM without jQuery might be actually possible these days though, but they're not doing it.




> I am not sure having everything in a single HTML file is any feat though.

This bears repeating. By this logic all projects, including convoluted React SPAs, are just a bundled away from claiming they are a single-HTML file project.


If you don’t want any external dependencies and want to replace jQuery. Then one solution is the site titled “You might not need jQuery” [1]. It points out plenty jQuery methods that can be replaced with plain JS. I actually recently advised a coworker to try learning plain JS and recommended that site. I honestly love using React though and won’t go without so don’t think I’m just a roll your own and dogfooding kind of person.

Anyways also as a self plug: I recently wrote a quick little dom library [2] (that is not published and only exists on a single code sandbox [doesn’t even have a license yet]) it’s in the file dom-lib.js. I made it in the last two days that people could look at just to see how you might go about writing a small framework that rerenders an app from top to bottom each time. Super unperformant and without optimizations. Well you can take a look, but don’t assume it’s anything more than two days work and some old code that I had laying around to help me traverse an object. I definitely don’t recommend adopting it or anything especially for production, but it works well enough as a lower-level dom library for the moment and I might make something more of it at some point (Be careful of XSS and understand that when something is assigned to .innerHTML, like the second parameter of the El function, then it should not contain user input. User input is what the third parameter of El is for.)

[1]: http://youmightnotneedjquery.com/ [2]: https://codesandbox.io/embed/example-plain-js-app-u6ce7?code...




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: