Event

class Event {
Widget srcElement;
Widget relatedTarget;
int clientX;
int clientY;
int viewportX;
int viewportY;
int button;
int buttonLinear;
Key key;
KeyEvent originalKeyEvent;
dchar character;
int state;
int intValue;
string stringValue;
bool shiftKey;
}

Constructors

this
this(string eventName, Widget target)

Creates an event without populating any members and without sending it. See dispatch

Members

Functions

dispatch
void dispatch()

this dispatches the element using the capture -> target -> bubble process

preventDefault
void preventDefault()

Prevents the default event handler (if there is one) from being called

sendDirectly
void sendDirectly()

this sends it only to the target. If you want propagation, use dispatch() instead.

stopPropagation
void stopPropagation()

Stops the event propagation immediately.

Variables

altKey
bool altKey;

NOTE: only set on key events right now

ctrlKey
bool ctrlKey;

NOTE: only set on key events right now

Meta