The situation is somewhat like-
var someVar = some_other_function(); someObj.addEventListener(\"click\", function(){ some_function(someVar); }, false); <
Since your event listener is 'click', you can:
someObj.setAttribute("onclick", "function(parameter)");