selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
92 lines (84 loc) • 93.6 kB
HTML
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>goog.style</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Namespace goog.style</h1><a class="source" href="source/lib/goog/style/style.js.src.html#l23">code »</a></header><section></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="static-functions"><h2>Global Functions</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1258">code »</a><span class="member"><a name="goog.style.clearTransparentBackgroundImage">goog.style.clearTransparentBackgroundImage</a> <span class="args">( el )</span></span></div><p>Clears the background image of an element in a browser independent manner.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>el: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to clear background image for.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1064">code »</a><code class="type"><T></code> <span class="member"><a name="goog.style.evaluateWithTemporaryDisplay_">goog.style.evaluateWithTemporaryDisplay_</a> <span class="args">( fn, element )</span> ⇒ <code class="type">T</code></span></div><p>Call <code >fn</code> on <code >element</code> such that <code >element</code>'s dimensions are
accurate when it's passed to <code >fn</code>.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>fn: <code class="type">function(!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a>): T</code><dd>Function to call with <code >element</code> as
an argument after temporarily changing <code >element</code>'s display such
that its dimensions are accurate.<dt>element: <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Element (which may have display none) to use as
argument to <code >fn</code>.</dl><tr><th>Returns<tr><td><dl>Value returned by calling <code >fn</code> with <code >element</code>.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l270">code »</a><span class="member"><a name="goog.style.getBackgroundColor">goog.style.getBackgroundColor</a> <span class="args">( element )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Retrieves the computed background color string for a given element. The
string returned is suitable for assigning to another element's
background-color, but is not guaranteed to be in any particular string
format. Accessing the color in a numeric form may not be possible in all
browsers or with all input.
If the background color for the element is defined as a hexadecimal value,
the resulting string can be parsed by goog.color.parse in all supported
browsers.
Whether named colors like "red" or "lightblue" get translated into a
format which can be parsed is browser dependent. Calling this function on
transparent elements will return "transparent" in most browsers or
"rgba(0, 0, 0, 0)" in WebKit.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the background color of.</dl><tr><th>Returns<tr><td><dl>The computed string value of the background color.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1816">code »</a><span class="member"><a name="goog.style.getBorderBox">goog.style.getBorderBox</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_goog_math_Box.html">goog.math.Box</a></code></span></div><p>Gets the computed border widths (on all sides) in pixels</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the border widths for.</dl><tr><th>Returns<tr><td><dl>The computed border widths.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1552">code »</a><span class="member"><a name="goog.style.getBorderBoxSize">goog.style.getBorderBoxSize</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_goog_math_Size.html">goog.math.Size</a></code></span></div><p>Gets the border box size for an element.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the size for.</dl><tr><th>Returns<tr><td><dl>The border box size.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l436">code »</a><span class="member"><a name="goog.style.getBoundingClientRect_">goog.style.getBoundingClientRect_</a> <span class="args">( el )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code></span></div><p>Gets the client rectangle of the DOM element.
getBoundingClientRect is part of a new CSS object model draft (with a
long-time presence in IE), replacing the error-prone parent offset
computation and the now-deprecated Gecko getBoxObjectFor.
This utility patches common browser bugs in getBoundingClientRect. It
will fail if getBoundingClientRect is unsupported.
If the element is not in the DOM, the result is undefined, and an error may
be thrown depending on user agent.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>el: <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element whose bounding rectangle is being queried.</dl><tr><th>Returns<tr><td><dl>A native bounding rectangle with numerical left, top,
right, and bottom. Reported by Firefox to be of object type ClientRect.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1146">code »</a><span class="member"><a name="goog.style.getBounds">goog.style.getBounds</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_goog_math_Rect.html">goog.math.Rect</a></code></span></div><p>Returns a bounding rectangle for a given element in page space.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Element to get bounds of. Must not be display none.</dl><tr><th>Returns<tr><td><dl>Bounding rectangle for the element.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1731">code »</a><span class="member"><a name="goog.style.getBox_">goog.style.getBox_</a> <span class="args">( element, stylePrefix )</span> ⇒ <code class="type">!<a href="class_goog_math_Box.html">goog.math.Box</a></code></span></div><p>Gets the computed paddings or margins (on all sides) in pixels.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the padding for.<dt>stylePrefix: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Pass 'padding' to retrieve the padding box,
or 'margin' to retrieve the margin box.</dl><tr><th>Returns<tr><td><dl>The computed paddings or margins.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l203">code »</a><span class="member"><a name="goog.style.getCascadedStyle">goog.style.getCascadedStyle</a> <span class="args">( element, style )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Gets the cascaded style value of a node, or null if the value cannot be
computed (only Internet Explorer can do this).</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Element to get style of.<dt>style: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Property to get (camel-case).</dl><tr><th>Returns<tr><td><dl>Style value.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l637">code »</a><span class="member"><a name="goog.style.getClientLeftTop">goog.style.getClientLeftTop</a> <span class="args">( el )</span> ⇒ <code class="type">!<a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a></code></span></div><p>Returns clientLeft (width of the left border and, if the directionality is
right to left, the vertical scrollbar) and clientTop as a coordinate object.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>el: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Element to get clientLeft for.</dl><tr><th>Returns<tr><td><dl>Client left and top.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l910">code »</a><span class="member"><a name="goog.style.getClientPosition">goog.style.getClientPosition</a> <span class="args">( el )</span> ⇒ <code class="type">!<a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a></code></span></div><p>Returns the position of the event or the element's border box relative to
the client viewport.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>el: <code class="type">(<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a>|Event|<a href="class_goog_events_Event.html">goog.events.Event</a>)</code><dd>Element or a mouse / touch event.</dl><tr><th>Returns<tr><td><dl>The position.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l878">code »</a><span class="member"><a name="goog.style.getClientPositionForElement_">goog.style.getClientPositionForElement_</a> <span class="args">( el )</span> ⇒ <code class="type">!<a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a></code></span></div><p>Returns the position of the event or the element's border box relative to
the client viewport.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>el: <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Element whose position to get.</dl><tr><th>Returns<tr><td><dl>The position.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l385">code »</a><span class="member"><a name="goog.style.getClientViewportElement">goog.style.getClientViewportElement</a> <span class="args">( opt_node )</span> ⇒ <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Returns the viewport element for a particular document</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_node: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a>=</code><dd>DOM node (Document is OK) to get the viewport element
of.</dl><tr><th>Returns<tr><td><dl>document.documentElement or document.body.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l235">code »</a><span class="member"><a name="goog.style.getComputedBoxSizing">goog.style.getComputedBoxSizing</a> <span class="args">( element )</span> ⇒ <code class="type">?<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Retrieves the computed value of the box-sizing CSS attribute.
Browser support: http://caniuse.com/css3-boxsizing.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element whose box-sizing to get.</dl><tr><th>Returns<tr><td><dl>'content-box', 'border-box' or 'padding-box'. null if
box-sizing is not supported (IE7 and below).</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l320">code »</a><span class="member"><a name="goog.style.getComputedCursor">goog.style.getComputedCursor</a> <span class="args">( element )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Retrieves the computed value of the cursor CSS attribute.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the cursor of.</dl><tr><th>Returns<tr><td><dl>The computed string value of the cursor attribute.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l280">code »</a><span class="member"><a name="goog.style.getComputedOverflowX">goog.style.getComputedOverflowX</a> <span class="args">( element )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Retrieves the computed value of the overflow-x CSS attribute.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the overflow-x of.</dl><tr><th>Returns<tr><td><dl>The computed string value of the overflow-x attribute.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l290">code »</a><span class="member"><a name="goog.style.getComputedOverflowY">goog.style.getComputedOverflowY</a> <span class="args">( element )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Retrieves the computed value of the overflow-y CSS attribute.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the overflow-y of.</dl><tr><th>Returns<tr><td><dl>The computed string value of the overflow-y attribute.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l247">code »</a><span class="member"><a name="goog.style.getComputedPosition">goog.style.getComputedPosition</a> <span class="args">( element )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Retrieves the computed value of the position CSS attribute.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the position of.</dl><tr><th>Returns<tr><td><dl>Position value.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l180">code »</a><span class="member"><a name="goog.style.getComputedStyle">goog.style.getComputedStyle</a> <span class="args">( element, property )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Retrieves a computed style value of a node. It returns empty string if the
value cannot be computed (which will be the case in Internet Explorer) or
"none" if the property requested is an SVG one and it has not been
explicitly set (firefox and webkit).</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Element to get style of.<dt>property: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Property to get (camel-case).</dl><tr><th>Returns<tr><td><dl>Style value.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l310">code »</a><span class="member"><a name="goog.style.getComputedTextAlign">goog.style.getComputedTextAlign</a> <span class="args">( element )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Retrieves the computed value of the text-align CSS attribute.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the text-align of.</dl><tr><th>Returns<tr><td><dl>The computed string value of the text-align attribute.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l330">code »</a><span class="member"><a name="goog.style.getComputedTransform">goog.style.getComputedTransform</a> <span class="args">( element )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Retrieves the computed value of the CSS transform attribute.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the transform of.</dl><tr><th>Returns<tr><td><dl>The computed string representation of the transform matrix.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l300">code »</a><span class="member"><a name="goog.style.getComputedZIndex">goog.style.getComputedZIndex</a> <span class="args">( element )</span> ⇒ <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code></span></div><p>Retrieves the computed value of the z-index CSS attribute.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the z-index of.</dl><tr><th>Returns<tr><td><dl>The computed value of the z-index attribute.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l574">code »</a><span class="member"><a name="goog.style.getContainerOffsetToScrollInto">goog.style.getContainerOffsetToScrollInto</a> <span class="args">( element, container, opt_center )</span> ⇒ <code class="type">!<a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a></code></span></div><p>Calculate the scroll position of <code >container</code> with the minimum amount so
that the content and the borders of the given <code >element</code> become visible.
If the element is bigger than the container, its top left corner will be
aligned as close to the container's top left corner as possible.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to make visible.<dt>container: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The container to scroll.<dt>opt_center: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>=</code><dd>Whether to center the element in the container.
Defaults to false.</dl><tr><th>Returns<tr><td><dl>The new scroll position of the container,
in form of goog.math.Coordinate(scrollLeft, scrollTop).</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1594">code »</a><span class="member"><a name="goog.style.getContentBoxSize">goog.style.getContentBoxSize</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_goog_math_Size.html">goog.math.Size</a></code></span></div><p>Gets the content box size for an element. This is potentially expensive in
all browsers.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the size for.</dl><tr><th>Returns<tr><td><dl>The content box size.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l2100">code »</a><span class="member"><a name="goog.style.getCssTranslation">goog.style.getCssTranslation</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a></code></span></div><p>Returns the x,y translation component of any CSS transforms applied to the
element, in pixels.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the translation of.</dl><tr><th>Returns<tr><td><dl>The CSS translation of the element in px.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l2044">code »</a><span class="member"><a name="goog.style.getFloat">goog.style.getFloat</a> <span class="args">( el )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Gets value of explicitly-set float CSS property on an element.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>el: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get float property of.</dl><tr><th>Returns<tr><td><dl>The value of explicitly-set float CSS property on this
element.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1849">code »</a><span class="member"><a name="goog.style.getFontFamily">goog.style.getFontFamily</a> <span class="args">( el )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Returns the font face applied to a given node. Opera and IE should return
the font actually displayed. Firefox returns the author's most-preferred
font (whether the browser is capable of displaying it or not.)</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>el: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element whose font family is returned.</dl><tr><th>Returns<tr><td><dl>The font family applied to el.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1939">code »</a><span class="member"><a name="goog.style.getFontSize">goog.style.getFontSize</a> <span class="args">( el )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Returns the font size, in pixels, of text in an element.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>el: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element whose font size is returned.</dl><tr><th>Returns<tr><td><dl>The font size (in pixels).</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l798">code »</a><span class="member"><a name="goog.style.getFramedPageOffset">goog.style.getFramedPageOffset</a> <span class="args">( el, relativeWin )</span> ⇒ <code class="type">!<a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a></code></span></div><p>Returns a Coordinate object relative to the top-left of an HTML document
in an ancestor frame of this element. Used for measuring the position of
an element inside a frame relative to a containing frame.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>el: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Element to get the page offset for.<dt>relativeWin: <code class="type">Window</code><dd>The window to measure relative to. If relativeWin
is not in the ancestor frame chain of the element, we measure relative to
the top-most window.</dl><tr><th>Returns<tr><td><dl>The page offset.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1799">code »</a><span class="member"><a name="goog.style.getIePixelBorder_">goog.style.getIePixelBorder_</a> <span class="args">( element, prop )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Helper function for IE to get the pixel border.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the pixel border for.<dt>prop: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The part of the property name.</dl><tr><th>Returns<tr><td><dl>The value in pixels.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1716">code »</a><span class="member"><a name="goog.style.getIePixelDistance_">goog.style.getIePixelDistance_</a> <span class="args">( element, propName )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Helper function for getting the pixel padding or margin for IE.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the padding for.<dt>propName: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The property name.</dl><tr><th>Returns<tr><td><dl>The pixel padding.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1689">code »</a><span class="member"><a name="goog.style.getIePixelValue_">goog.style.getIePixelValue_</a> <span class="args">( element, value, name, pixelName )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>IE specific function that converts a non pixel unit to pixels.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to convert the value for.<dt>value: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The current value as a string. The value must not be
''.<dt>name: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The CSS property name to use for the converstion. This
should be 'left', 'top', 'width' or 'height'.<dt>pixelName: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The CSS pixel property name to use to get the
value in pixels.</dl><tr><th>Returns<tr><td><dl>The value in pixels.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1901">code »</a><span class="member"><a name="goog.style.getLengthUnits">goog.style.getLengthUnits</a> <span class="args">( value )</span> ⇒ <code class="type">?<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Returns the units used for a CSS length measurement.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>A CSS length quantity.</dl><tr><th>Returns<tr><td><dl>The units of measurement.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1775">code »</a><span class="member"><a name="goog.style.getMarginBox">goog.style.getMarginBox</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_goog_math_Box.html">goog.math.Box</a></code></span></div><p>Gets the computed margins (on all sides) in pixels.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the margins for.</dl><tr><th>Returns<tr><td><dl>The computed margins.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l476">code »</a><span class="member"><a name="goog.style.getOffsetParent">goog.style.getOffsetParent</a> <span class="args">( element )</span> ⇒ <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Returns the first parent that could affect the position of a given element.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the offset parent for.</dl><tr><th>Returns<tr><td><dl>The first offset parent or null if one cannot be found.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1183">code »</a><span class="member"><a name="goog.style.getOpacity">goog.style.getOpacity</a> <span class="args">( el )</span> ⇒ <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)</code></span></div><p>Gets the opacity of a node (x-browser). This gets the inline style opacity
of the node, and does not take into account the cascaded or the computed
style for this node.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>el: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Element whose opacity has to be found.</dl><tr><th>Returns<tr><td><dl>Opacity between 0 and 1 or an empty string <code >''</code>
if the opacity is not set.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1765">code »</a><span class="member"><a name="goog.style.getPaddingBox">goog.style.getPaddingBox</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_goog_math_Box.html">goog.math.Box</a></code></span></div><p>Gets the computed paddings (on all sides) in pixels.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to get the padding for.</dl><tr><th>Returns<tr><td><dl>The computed paddings.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l665">code »</a><span class="member"><a name="goog.style.getPageOffset">goog.style.getPageOffset</a> <span class="args">( el )</span> ⇒ <code class="type">!<a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a></code></span></div><p>Returns a Coordinate object relative to the top-left of the HTML document.
Implemented as a single function to save having to do two recursive loops in
opera and safari just to get both coordinates. If you just want one value do
use goog.style.getPageOffsetLeft() and goog.style.getPageOffsetTop(), but
note if you call both those methods the tree will be analysed twice.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>el: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Element to get the page offset for.</dl><tr><th>Returns<tr><td><dl>The page offset.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l772">code »</a><span class="member"><a name="goog.style.getPageOffsetLeft">goog.style.getPageOffsetLeft</a> <span class="args">( el )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Returns the left coordinate of an element relative to the HTML document</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>el: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Elements.</dl><tr><th>Returns<tr><td><dl>The left coordinate.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l782">code »</a><span class="member"><a name="goog.style.getPageOffsetTop">goog.style.getPageOffsetTop</a> <span class="args">( el )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Returns the top coordinate of an element relative to the HTML document</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>el: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Elements.</dl><tr><th>Returns<tr><td><dl>The top coordinate.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1004">code »</a><span class="member"><a name="goog.style.getPixelStyleValue_">goog.style.getPixelStyleValue_</a> <span class="args">( value, round )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Helper function to create a string to be set into a pixel-value style
property of an element. Can round to the nearest integer value.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code><dd>The style value to be used. If a number,
'px' will be appended, otherwise the value will be applied directly.<dt>round: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd>Whether to round the nearest integer (if property
is a number).</dl><tr><th>Returns<tr><td><dl>The string value for the property.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l374">code »</a><span class="member"><a name="goog.style.getPosition">goog.style.getPosition</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a></code></span></div><p>Gets the offsetLeft and offsetTop properties of an element and returns them
in a Coordinate object</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Element.</dl><tr><th>Returns<tr><td><dl>The position.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l864">code »</a><span class="member"><a name="goog.style.getRelativePosition">goog.style.getRelativePosition</a> <span class="args">( a, b )</span> ⇒ <code class="type">!<a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a></code></span></div><p>Returns the position of an element relative to another element in the
document. A relative to B</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>a: <code class="type">(<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a>|Event|<a href="class_goog_events_Event.html">goog.events.Event</a>)</code><dd>Element or mouse event whose
position we're calculating.<dt>b: <code class="type">(<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a>|Event|<a href="class_goog_events_Event.html">goog.events.Event</a>)</code><dd>Element or mouse event position
is relative to.</dl><tr><th>Returns<tr><td><dl>The relative position.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l2058">code »</a><span class="member"><a name="goog.style.getScrollbarWidth">goog.style.getScrollbarWidth</a> <span class="args">( opt_className )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Returns the scroll bar width (represents the width of both horizontal
and vertical scroll).</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_className: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>An optional class name (or names) to apply
to the invisible div created to measure the scrollbar. This is necessary
if some scrollbars are styled differently than others.</dl><tr><th>Returns<tr><td><dl>The scroll bar width in px.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1046">code »</a><span class="member"><a name="goog.style.getSize">goog.style.getSize</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_goog_math_Size.html">goog.math.Size</a></code></span></div><p>Gets the height and width of an element, even if its display is none.
Specifically, this returns the height and width of the border box,
irrespective of the box model in effect.
Note that this function does not take CSS transforms into account. Please see
<code >goog.style.getTransformedSize</code>.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Element to get size of.</dl><tr><th>Returns<tr><td><dl>Object with width/height properties.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1094">code »</a><span class="member"><a name="goog.style.getSizeWithDisplay_">goog.style.getSizeWithDisplay_</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_goog_math_Size.html">goog.math.Size</a></code></span></div><p>Gets the height and width of an element when the display is not none.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Element to get size of.</dl><tr><th>Returns<tr><td><dl>Object with width/height properties.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l152">code »</a><span class="member"><a name="goog.style.getStyle">goog.style.getStyle</a> <span class="args">( element, property )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Retrieves an explicitly-set style value of a node. This returns '' if there
isn't a style attribute on the element or if this style property has not been
explicitly set in script.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Element to get style of.<dt>property: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Property to get, css-style (if you have a camel-case
property, use element.style[style]).</dl><tr><th>Returns<tr><td><dl>Style value.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l221">code »</a><span class="member"><a name="goog.style.getStyle_">goog.style.getStyle_</a> <span class="args">( element, style )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Cross-browser pseudo get computed style. It returns the computed style where
available. If not available it tries the cascaded style value (IE
currentStyle) and in worst case the inline style value. It shouldn't be
called directly, see http://wiki/Main/ComputedStyleVsCascadedStyle for
discussion.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>Element to get style of.<dt>style: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Property to get (must be camelCase, not css-style.).</dl><tr><th>Returns<tr><td><dl>Style value.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/style/style.js.src.html#l1129">code »</a><span class="member"><a name="goog.style.getTransformedSize">goog.style.getTransformedSize</a> <span class="args">( element )</span> ⇒ <code class="type"><a href="class_goog_math_Size.html">goog.math.Size</a></code></span></div><p>Gets the height and width of an element, post transform, even if its display
is none.
This is like <code >goog.style.getSize</code>, except:
<ol>
<li>Takes webkitTransforms s