Added sendEvent to a context