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

Probably this JavaScript function I posted on my blog in 2003 https://simonwillison.net/2003/Mar/25/getElementsBySelector/

Wow. You were the original querySelector. It's funny how you forget that somebody actually sat down and wrote these things into existence at some point. Thanks!

Even more impressive to me is writing things into existence without the benefit of being able to dig in to the underlying browser tech, and only being able to use the public (at the time) DOM APIs like getElementById, etc.

He's understating, perhaps on purpose.

Datasette, Django, and Lanyrd.

To be fair the original question was "most" impactful thing...

Ten years ago I was reading [0] and I remember your name was mentioned somewhere. Here is a quote:

> Locating elements by their class name is a widespread technique popularized by Simon Willison (http://simon.incutio.com) in 2003 and originally written by Andrew Hayward (http://www.mooncalf.me.uk)

[0] Page 91 from "Pro JavaScript Techniques" by John Resig.

Yeah here's Andy's getElementsByClassName post (via the Internet Archive): https://web.archive.org/web/20030402172546/http://blog.moonc...

Hey Simon, thanks for creating Django with Adrian. I was deeply interested in programming from a young age but learning Django in my teens sparked a passion for web development that has yet to feign so many years later! Appreciate all your contributions to this space.


My most impactful thing I've done outside of paid work is a website running on Django. I could live without queryBySelector or their descendants, but not without Django.

Thank you, Simon.


   /* That revolting regular expression explained 
     \---/  \---/\-------------/    \-------/
       |      |         |               |
       |      |         |           The value
       |      |    ~,|,^,$,* or =
       |   Attribute 
all regexes should have ascii art explainers!

(from https://static.simonwillison.net/static/2003/getElementsBySe...)

What a coincidence. Just yesterday i've used getElementsBySelector for the first time while making a greasemonkey script.

Wow, 10 years before document.querySelectorAll()!

> Wow, 10 years before document.querySelectorAll()

querySelectorAll wouldn't ever appear without jQuery which got its idea from Simon's idea.

And even then querySelectorAll was so poorly implemented that it didn't even have any useful helper methods.

I like seeing this. At the time I remember thinking we needed something like this, and why doesn’t the browser have it already?

Then thinking, I suppose you could do it by (exactly the method you used), but never actually doing it because if it were that simple, someone would have already done it.

Actually, seeing the date, I realize this predates me even leaving high-school, which makes it even more atrocious that I never knew of it!

IOU 1 beer.

Applications are open for YC Summer 2023

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