Javascript addEventHandler - jcobban/Genealogy GitHub Wiki
function addEventHandler(element, type, handler)()
Up: Javascript Programming Guide
Source: /jscripts/util.js
The function provides a portable interface for adding event handlers.
If the browser supports the W3C element.addEventListener
method then it uses that to add the handler.
If the browser supports the Microsoft element.attachEvent
method then it uses that to add the handler.
Otherwise it uses the original element.onxxxx
method which does not guarantee that an Event object is passed to the handler.