4 ms·
I think it’s a great exercise to come up with declarative abstractions over the DOM API. I had quite a bit of fun doing this. It only took a few hundred lines o
by jcpst 4y ago
I think it’s a great exercise to come up with declarative abstractions over the DOM API. I had quite a bit of fun doing this. It only took a few hundred lines of JS to make a core for a useful web app.
- masswerk 4y agoMoreover, `Object.handleEvent()` allows you to handle any events centralised inside an object and in its specific context since the days of Netscape 4.0. (Which is something many frameworks try to fix, ignoring that it's already in the core language. Admittedly, IE didn't support this before IE6, but by now this is really cargo cult. If there is `addEventListener`, there's also `handleEvent` and no need for extra bindings.)