Detailed Description

The root of all DOM events.

Inheritance diagram for Dom.Event:
Css.CssEvent Dom.HashChangeEvent Dom.LanguageEvent PowerSlide.SlideEvent PowerUI.AnimationEvent PowerUI.AudioProcessingEvent PowerUI.BeforeInputEvent PowerUI.BeforeUnloadEvent PowerUI.BlobEvent PowerUI.ClipboardEvent PowerUI.CloseEvent PowerUI.CSSFontFaceLoadEvent PowerUI.CustomEvent PowerUI.DeviceLightEvent PowerUI.DeviceMotionEvent PowerUI.DeviceOrientationEvent PowerUI.DeviceProximityEvent PowerUI.DOMTransactionEvent PowerUI.EditingBeforeInputEvent PowerUI.ErrorEvent PowerUI.FetchEvent PowerUI.GamepadEvent PowerUI.IDBVersionChangeEvent PowerUI.MediaStreamEvent PowerUI.MessageEvent PowerUI.OfflineAudioCompletionEvent PowerUI.PageTransitionEvent PowerUI.PopStateEvent PowerUI.ProgressEvent PowerUI.RelatedEvent PowerUI.RTCDataChannelEvent PowerUI.RTCIdentityErrorEvent PowerUI.RTCIdentityEvent PowerUI.RTCPeerConnectionIceEvent PowerUI.SensorEvent PowerUI.SpriteEvent PowerUI.StorageEvent PowerUI.SVGEvent PowerUI.TextEvent PowerUI.TimeEvent PowerUI.TrackEvent PowerUI.TransitionEvent PowerUI.UIEvent PowerUI.UserProximityEvent PowerUI.WebGLContextEvent

Public Member Functions

 Event ()
 
 Event (string type)
 
 Event (string type, object init)
 
virtual void Reset ()
 Reset an event so it can be reused. Doesn't affect bubbles/ trusted etc. More...
 
void initEvent (string type, bool bubb, bool canc)
 used to initialize the value of an event created using Document.createEvent() More...
 
virtual void Setup (object init)
 Sets up the init dictionary. Note that it can be null. More...
 
void stopPropagation ()
 Stops the event bubbling to any other elements. More...
 
void stopImmediatePropagation ()
 Stops the event bubbling to any other elements. More...
 
EventTarget[] deepPath ()
 The deep path of this event. (Unclear working draft spec; subject to change). http://w3c.github.io/webcomponents/spec/shadow/#widl-Event-deepPath-sequence-EventTarget More...
 
void preventDefault ()
 Stops the default event handler occuring. More...
 
void initUIEvent (string type, bool canBubble, bool cancelable, PowerUI.Window view, ulong detail)
 Sets up this UIEvent. More...
 

Public Attributes

const int NONE =0
 Event phase (none). More...
 
const int CAPTURING_PHASE =1
 Event capturing phase. More...
 
const int AT_TARGET =2
 Event target phase. More...
 
const int BUBBLING_PHASE =3
 Event bubbling phase. More...
 
float clientX
 The x location of the mouse, as measured from the left of the screen. More...
 
float clientY
 The y location of the mouse, as measured from the top of the screen. More...
 
int eventPhase
 The current phase of this event. More...
 
uint Modifiers
 Modifiers such as shift. Use &x to access a particular one, where x is from e.g. EventModifierInit.MODIFIER_SHIFT_ALT_GRAPH More...
 
int keyCode
 The keycode of the key pressed. More...
 
bool heldDown
 True if the mouse button or key is currently down. More...
 
char character
 The character that has been typed. More...
 
bool bubbles =false
 True if this event bubbles or not. Doesn't bubble by default. More...
 
bool cancelable =true
 True if this event can be cancelled (from bubbling further). All are by default. More...
 
EventTarget target
 The node that was clicked on or focused. It's a node because documents generate it too. Use htmlTarget if you're sure it's a HtmlElement of some kind. More...
 
EventTarget currentTarget
 Current target of this event. More...
 

Package Functions

void SetTrusted ()
 
void SetTrusted (bool bubbles)
 

Package Attributes

string EventType
 The type of this event. Only set if you directly use the UIEvent(type) constructor. See type instead. More...
 
bool _Cancelled
 True if this event has been cancelled via preventDefault. More...
 
bool _CancelImmediate
 True if this has been immediately cancelled. More...
 
bool _IsTrusted
 True if this was created by the UA. Use isTrusted. More...
 

Properties

bool cancelBubble [get, set]
 Set to true if you do not want this event to bubble any further. More...
 
bool isTrusted [get]
 True if this was created by the UA. Use isTrusted. More...
 
string type [get, set]
 The type of this event. More...
 
Node srcElement [get]
 The node that was clicked on or focused. More...
 
bool defaultPrevented [get]
 True if the default has been prevented. More...
 
DateTime timeStamp [get]
 Current time of this event. More...
 
string char [get]
 The printable character if it is one. More...
 
int button [get]
 The mouse button that was pressed. See isLeftMouse and isRightMouse for clearer ways of using this value. More...
 
bool isLeftMouse [get]
 Mouseup/down only. Was it the left mouse button? More...
 
bool isRightMouse [get]
 Mouseup/down only. Was it the right mouse button? More...
 
Document document [get]
 The document that this event has come from, if any. More...
 
Windows.Window sparkWindow [get]
 The window that the currentTarget of the event is in. More...
 

Private Attributes

bool _CancelBubble
 Set to true if you do not want this event to bubble any further. More...
 
DateTime _Timestamp
 

Constructor & Destructor Documentation

Dom.Event.Event ( )
inline
Dom.Event.Event ( string  type)
inline
Dom.Event.Event ( string  type,
object  init 
)
inline

Member Function Documentation

EventTarget [] Dom.Event.deepPath ( )
inline

The deep path of this event. (Unclear working draft spec; subject to change). http://w3c.github.io/webcomponents/spec/shadow/#widl-Event-deepPath-sequence-EventTarget

void Dom.Event.initEvent ( string  type,
bool  bubb,
bool  canc 
)
inline

used to initialize the value of an event created using Document.createEvent()

void Dom.Event.initUIEvent ( string  type,
bool  canBubble,
bool  cancelable,
PowerUI.Window  view,
ulong  detail 
)
inline

Sets up this UIEvent.

void Dom.Event.preventDefault ( )
inline

Stops the default event handler occuring.

virtual void Dom.Event.Reset ( )
inlinevirtual

Reset an event so it can be reused. Doesn't affect bubbles/ trusted etc.

void Dom.Event.SetTrusted ( )
inlinepackage
void Dom.Event.SetTrusted ( bool  bubbles)
inlinepackage
virtual void Dom.Event.Setup ( object  init)
inlinevirtual

Sets up the init dictionary. Note that it can be null.

Reimplemented in PowerUI.ClipboardEvent, PowerUI.BlobEvent, PowerUI.SpriteEvent, PowerUI.AudioProcessingEvent, and PowerUI.AnimationEvent.

void Dom.Event.stopImmediatePropagation ( )
inline

Stops the event bubbling to any other elements.

void Dom.Event.stopPropagation ( )
inline

Stops the event bubbling to any other elements.

Member Data Documentation

bool Dom.Event._CancelBubble
private

Set to true if you do not want this event to bubble any further.

bool Dom.Event._CancelImmediate
package

True if this has been immediately cancelled.

bool Dom.Event._Cancelled
package

True if this event has been cancelled via preventDefault.

bool Dom.Event._IsTrusted
package

True if this was created by the UA. Use isTrusted.

DateTime Dom.Event._Timestamp
private
const int Dom.Event.AT_TARGET =2

Event target phase.

bool Dom.Event.bubbles =false

True if this event bubbles or not. Doesn't bubble by default.

const int Dom.Event.BUBBLING_PHASE =3

Event bubbling phase.

bool Dom.Event.cancelable =true

True if this event can be cancelled (from bubbling further). All are by default.

const int Dom.Event.CAPTURING_PHASE =1

Event capturing phase.

char Dom.Event.character

The character that has been typed.

float Dom.Event.clientX

The x location of the mouse, as measured from the left of the screen.

float Dom.Event.clientY

The y location of the mouse, as measured from the top of the screen.

EventTarget Dom.Event.currentTarget

Current target of this event.

int Dom.Event.eventPhase

The current phase of this event.

string Dom.Event.EventType
package

The type of this event. Only set if you directly use the UIEvent(type) constructor. See type instead.

bool Dom.Event.heldDown

True if the mouse button or key is currently down.

int Dom.Event.keyCode

The keycode of the key pressed.

uint Dom.Event.Modifiers

Modifiers such as shift. Use &x to access a particular one, where x is from e.g. EventModifierInit.MODIFIER_SHIFT_ALT_GRAPH

const int Dom.Event.NONE =0

Event phase (none).

EventTarget Dom.Event.target

The node that was clicked on or focused. It's a node because documents generate it too. Use htmlTarget if you're sure it's a HtmlElement of some kind.

Property Documentation

int Dom.Event.button
get

The mouse button that was pressed. See isLeftMouse and isRightMouse for clearer ways of using this value.

bool Dom.Event.cancelBubble
getset

Set to true if you do not want this event to bubble any further.

string Dom.Event.char
get

The printable character if it is one.

bool Dom.Event.defaultPrevented
get

True if the default has been prevented.

Document Dom.Event.document
get

The document that this event has come from, if any.

bool Dom.Event.isLeftMouse
get

Mouseup/down only. Was it the left mouse button?

bool Dom.Event.isRightMouse
get

Mouseup/down only. Was it the right mouse button?

bool Dom.Event.isTrusted
get

True if this was created by the UA. Use isTrusted.

Windows.Window Dom.Event.sparkWindow
get

The window that the currentTarget of the event is in.

Node Dom.Event.srcElement
get

The node that was clicked on or focused.

DateTime Dom.Event.timeStamp
get

Current time of this event.

string Dom.Event.type
getset

The type of this event.