The situation is somewhat like-
var someVar = some_other_function(); someObj.addEventListener(\"click\", function(){ some_function(someVar); }, false); <
just would like to add. if anyone is adding a function which updates checkboxes to an event listener, you would have to use event.target instead of this to update the checkboxes.
event.target
this