Table of Contents

Method InitEvent

Namespace
SharpVectors.Dom.Events
Assembly
SharpVectors.Core.dll

InitEvent(string, bool, bool)

(DOM Level 2) The InitEvent method is used to initialize the value of an IEvent created through the IDocumentEvent.CreateEvent method.

void InitEvent(string eventTypeArg, bool canBubbleArg, bool cancelableArg)

Parameters

eventTypeArg string

Specifies the event type.

canBubbleArg bool

Specifies whether or not the event can bubble. This parameter overrides the intrinsic bubbling behavior of the event.

cancelableArg bool

Specifies whether or not the event's default action can be prevented. This parameter overrides the intrinsic cancelable behavior of the event.

Remarks

This method may only be called before the IEvent has been dispatched via the IEventTarget.DispatchEvent method. If the method is called several times before invoking IEventTarget.DispatchEvent, only the final invocation takes precedence. If called from a subclass of Event interface only the values specified in this method are modified, all other attributes are left unchanged. This method sets the IEvent.Type attribute to eventTypeArg, and IEvent.NamespaceUri to null. To initialize an event with a local name and namespace URI, use the InitEventNs method.