Low level helper for creating DOM events