move event send after type definition
Merge branch 'master' into gh-pages