Sends an event to the current element.
HRESULT dispatchEvent( IDOMEvent *evt, VARIANT_BOOL *pfResult );
- [in] The event object to dispatch.
- [out, retval] A VARIANT_BOOL value that indicates whether any of the event handlers called IDOMEvent::preventDefault.
- Default. The default action is permitted.
- The caller should prevent the default action.
Returns one of the following values.
S_OK The operation completed successfully. W3CException_DOM_NOT_SUPPORTED_ERR You cannot dispatch an internal event. W3CException_EVENT_DISPATCH_REQUEST_ERR The event object has already been dispatched. W3CException_EVENT_UNSPECIFIED_EVENT_TYPE_ERR The type of the event was not specified.
Events that the dispatchEvent method dispatches are subject to the same capturing and bubbling behavior as events that the browser dispatches.
You cannot cancel some events. For more information, see the documentation for the event.