To use; just copy the devent function to the page in which it needs to be used.
Initialize it by xxEventName = new devent()
You can set what happens when the event is fired by assigning a function to the XXEventName.myEvent property, and you can trigger the event by using the XXEventName.fire() method.
The example below is the best method on which to use it.
Click below and then Wait 5 seconds