The situation is somewhat like-
var someVar = some_other_function(); someObj.addEventListener(\"click\", function(){ some_function(someVar); }, false); <
You can just bind all necessary arguments with 'bind':
root.addEventListener('click', myPrettyHandler.bind(null, event, arg1, ... ));
In this way you'll always get the event, arg1, and other stuff passed to myPrettyHandler.
event
arg1
myPrettyHandler
http://passy.svbtle.com/partial-application-in-javascript-using-bind