avoid creating a DOM event
fixing issues according to jshint