Expand Minimize

dispatchEvent method

Dispatches an event to an object.

Document Object Model (DOM) Level 2 Events Specification, Section 1.3.1Internet Explorer 10

Syntax

var retVal = SVGElementInstance.dispatchEvent(evt);

Parameters

evt [in]

Type: Event

An object reference to the event to be dispatched.

retVal [out, retval]

Type: boolean

Indicates whether preventDefault() was called by an event listener handling the dispatched event.

ValueMeaning
true

No event listener called preventDefault().

false

An event listener called preventDefault().

 

Return value

Type: boolean

Indicates whether preventDefault() was called by an event listener handling the dispatched event.

true

No event listener called preventDefault().

false

An event listener called preventDefault().

Exceptions

ExceptionCondition
InvalidStateError

The type attribute of the event object was not specified before the event was dispatched. For versions earlier than Internet Explorer 10, UNSPECIFIED_EVENT_TYPE_ERR is returned.

InvalidCharacterError

The event was already dispatched. For versions earlier than Internet Explorer 10, DISPATCH_REQUEST_ERR is returned.

InvalidCharacterError

The value specified for the type attribute violates restrictions for the specific event type. For versions earlier than Internet Explorer 10, INVALID_CHARACTER_ERR is returned.

NotSupportedError

The event object was not created using the DocumentEvent.createEvent method. For versions earlier than Internet Explorer 10, NOT_SUPPORTED_ERR is returned.

Standards information

See also

SVGElementInstance

 

 

Show:
© 2014 Microsoft