2 ms·
This seems like a clean approach and one that I've heard before. I now build function generators that wrap functionality around passed in elements and then regi
by sfioritto 18y ago
This seems like a clean approach and one that I've heard before. I now build function generators that wrap functionality around passed in elements and then register these functions with events -- so basically what you are doing except with closures instead of objects. I've found this approach useful where I'd prefer not to use a CSS selector over and over again.
My suspicion is that these problems have been solved already by programmers creating traditional event-driven GUI applications. This is unfortunately something I have no experience in so I can only guess that there is some overlap in these problem domains.