CH22 / E151|Fixing Bad Code|Mon, 18 Nov ’13
A Clever Little Event Monitor
A lot of our HtmlElement tests have a complicated bit of code to detect whether an event has been triggered. In this episode, we write a little function to simplify that code. The result is easier to read and eliminates the worst of our tests’ duplication.