I did a search for javascript events and came up with lots of articles about onclick and onload and all the lovely things we use to make our pages interactive. But in this case, I wanted a C#-style event, like an event on an object. With a little more digging, I found this article about C#-style events which pointed me towards the approach of just keeping a list of the functions that should be triggered by that event. However, I didn’t like the way it was written so I decided to re-implement the same idea in a JavaScript writing style more like this article about JavaScript instant iterators. Here’s the result:
-
Recent Posts
Recent Comments
- Z F on Navigate to URLs outside of the Angular application with target=”_self”
- stef on Using jQuery to provide an inline confirmation on buttons
- Eli Thompson on Using jQuery to provide an inline confirmation on buttons
- stef on Using jQuery to provide an inline confirmation on buttons
- stef on Using jQuery to provide an inline confirmation on buttons
Archives
Categories
Meta