{infiniteZest}
// Articles. Tutorials. Utilities.
Home  |   Search  |   Login  
Categories Skip Navigation Links
New / All
AJAX
Apple
ASP.NET
.NET
Git
Google / Android
Python / IronPython
Miscellaneous
SQL Server
AJAX Source Viewer
View the source code of a Method from ASP.NET AJAX Library. Choose a method from the menu items above (Namespaces, Classes, or Methods).
Method 'DomEvent(eventObject)'
Method: DomEvent(eventObject)
Method Full Name:     Sys$UI$DomEvent(eventObject)
Class: DomEvent
Namespace: Sys.UI
Source File: MicrosoftAjax.debug.js
1   Sys.UI.DomEvent = function Sys$UI$DomEvent(eventObject) {
2     /// <summary locid="M:J#Sys.UI.DomEvent.#ctor" />
3     /// <param name="eventObject"></param>
4     /// <field name="altKey" type="Boolean" locid="F:J#Sys.UI.DomEvent.altKey"></field>
5     /// <field name="button" type="Sys.UI.MouseButton" locid="F:J#Sys.UI.DomEvent.button"></field>
6     /// <field name="charCode" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.charCode"></field>
7     /// <field name="clientX" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.clientX"></field>
8     /// <field name="clientY" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.clientY"></field>
9     /// <field name="ctrlKey" type="Boolean" locid="F:J#Sys.UI.DomEvent.ctrlKey"></field>
10    /// <field name="keyCode" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.keyCode"></field>
11    /// <field name="offsetX" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.offsetX"></field>
12    /// <field name="offsetY" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.offsetY"></field>
13    /// <field name="screenX" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.screenX"></field>
14    /// <field name="screenY" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.screenY"></field>
15    /// <field name="shiftKey" type="Boolean" locid="F:J#Sys.UI.DomEvent.shiftKey"></field>
16    /// <field name="target" locid="F:J#Sys.UI.DomEvent.target"></field>
17    /// <field name="type" type="String" locid="F:J#Sys.UI.DomEvent.type"></field>
18    var e = Function._validateParams(arguments, [
19    {name: "eventObject"}
20    ]);
21    if (e) throw e;
22    var e = eventObject;
23    this.rawEvent = e;
24    this.altKey = e.altKey;
25    if (typeof(e.button) !== 'undefined') {
26      this.button = (typeof(e.which) !== 'undefined') ? e.button :
27      (e.button === 4) ? Sys.UI.MouseButton.middleButton :
28      (e.button === 2) ? Sys.UI.MouseButton.rightButton :
29      Sys.UI.MouseButton.leftButton;
30    }
31    if (e.type === 'keypress') {
32      this.charCode = e.charCode || e.keyCode;
33    }
34    else if (e.keyCode && (e.keyCode === 46)) {
35      this.keyCode = 127;
36    }
37    else {
38      this.keyCode = e.keyCode;
39    }
40    this.clientX = e.clientX;
41    this.clientY = e.clientY;
42    this.ctrlKey = e.ctrlKey;
43    this.target = e.target ? e.target : e.srcElement;
44    if ((typeof(e.offsetX) !== 'undefined') && (typeof(e.offsetY) !== 'undefined')) {
45      this.offsetX = e.offsetX;
46      this.offsetY = e.offsetY;
47    }
48    else if (this.target && (this.target.nodeType !== 3) && (typeof(e.clientX) === 'number')) {
49      var loc = Sys.UI.DomElement.getLocation(this.target);
50      var w = Sys.UI.DomElement._getWindow(this.target);
51      this.offsetX = (w.pageXOffset || 0) + e.clientX - loc.x;
52      this.offsetY = (w.pageYOffset || 0) + e.clientY - loc.y;
53    }
54    this.screenX = e.screenX;
55    this.screenY = e.screenY;
56    this.shiftKey = e.shiftKey;
57    this.type = e.type;
58  }
This is the JavaScript source for method DomEvent(eventObject) from ASP.NET AJAX Library. Full name for this method is Sys$UI$DomEvent(eventObject). It belongs to the class DomEvent, which is in Sys.UI namespace. This source is in MicrosoftAjax.debug.js file.
Bookmark and Share This
About  Contact  Privacy Policy  Site Map