{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 '_getCurrentStyle(element)'
Method: _getCurrentStyle(element)
Method Full Name:     Sys$UI$DomElement$_getCurrentStyle(element)
Class: DomElement
Namespace: Sys.UI
Source File: MicrosoftAjax.debug.js
1   Sys.UI.DomElement._getCurrentStyle = function Sys$UI$DomElement$_getCurrentStyle(element) {
2     if (element.nodeType === 3) return null;
3     var w = Sys.UI.DomElement._getWindow(element);
4     if (element.documentElement) element = element.documentElement;
5     var computedStyle = (w && (element !== w) && w.getComputedStyle) ?
6     w.getComputedStyle(element, null) :
7     element.currentStyle || element.style;
8     if (!computedStyle && (Sys.Browser.agent === Sys.Browser.Safari) && element.style) {
9       var oldDisplay = element.style.display;
10      var oldPosition = element.style.position;
11      element.style.position = 'absolute';
12      element.style.display = 'block';
13      var style = w.getComputedStyle(element, null);
14      element.style.display = oldDisplay;
15      element.style.position = oldPosition;
16      computedStyle = {};
17      for (var n in style) {
18        computedStyle[n] = style[n];
19      }
20      computedStyle.display = 'none';
21    }
22    return computedStyle;
23  }
This is the JavaScript source for method _getCurrentStyle(element) from ASP.NET AJAX Library. Full name for this method is Sys$UI$DomElement$_getCurrentStyle(element). It belongs to the class DomElement, which is in Sys.UI namespace. This source is in MicrosoftAjax.debug.js file.
Bookmark and Share This
About  Contact  Privacy Policy  Site Map