Update events.js

fixed __trigger return undefined__ bug