UNPKG

selenium-webdriver

Version:

The official WebDriver JavaScript bindings from the Selenium project

33 lines 7.66 kB
<!DOCTYPE html><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"><meta http-equiv="Content-Language" content="en"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>bot.userAgent</title><link href="dossier.css" rel="stylesheet" type="text/css"><header><div><form><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></header><main><article><div class="codelink"><a href="source/lib/atoms/userAgent.js.src.html#l22">View Source</a></div><h1>namespace bot.userAgent</h1><h2>Functions</h2><div id="isEngineVersion" class="function"><div><h3>isEngineVersion(<wbr>version)<span class="codelink"><a href="source/lib/atoms/userAgent.js.src.html#l44">code »</a></span></h3><p>Whether the rendering engine version of the current browser is equal to or greater than the given version. This implementation differs from goog.userAgent.isVersion in the following ways:</p> <ol><li>in a Firefox extension, tests the engine version through the XUL version comparator service, because no window.navigator object is available </li><li>in IE, compares the given version to the current documentMode </li></ol> <div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>version<code>(<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><p>The version number to check.</p> </dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether the browser engine version is the same or higher than the given version.</p> </dl></div></div></div></div><hr class="fn-sep"><div id="isProductVersion" class="function"><div><h3>isProductVersion(<wbr>version)<span class="codelink"><a href="source/lib/atoms/userAgent.js.src.html#l70">code »</a></span></h3><p>Whether the product version of the current browser is equal to or greater than the given version. This implementation differs from goog.userAgent.product.isVersion in the following ways:</p> <ol><li>in a Firefox extension, tests the product version through the XUL version comparator service, because no window.navigator object is available </li><li>on Android, always compares to the version to the OS version </li></ol> <div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>version<code>(<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><p>The version number to check.</p> </dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether the browser product version is the same or higher than the given version.</p> </dl></div></div></div></div><h2>Properties</h2><div id="ANDROID_PRE_GINGERBREAD" class="property"><dl><dt><a href="source/lib/atoms/userAgent.js.src.html#l229">ANDROID_PRE_GINGERBREAD</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether the current browser is Android pre-gingerbread.</p> </dl></div><div id="ANDROID_PRE_ICECREAMSANDWICH" class="property"><dl><dt><a href="source/lib/atoms/userAgent.js.src.html#l238">ANDROID_PRE_ICECREAMSANDWICH</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether the current browser is Android pre-icecreamsandwich</p> </dl></div><div id="FIREFOX_EXTENSION" class="property"><dl><dt><a href="source/lib/atoms/userAgent.js.src.html#l106">FIREFOX_EXTENSION</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether we are in a Firefox extension.</p> </dl></div><div id="IE_DOC_10" class="property"><dl><dt><a href="source/lib/atoms/userAgent.js.src.html#l212">IE_DOC_10</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether the current document is IE in IE10 (or newer) standards mode.</p> </dl></div><div id="IE_DOC_9" class="property"><dl><dt><a href="source/lib/atoms/userAgent.js.src.html#l195">IE_DOC_9</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether the current document is IE in IE9 (or newer) standards mode.</p> </dl></div><div id="IE_DOC_PRE10" class="property"><dl><dt><a href="source/lib/atoms/userAgent.js.src.html#l220">IE_DOC_PRE10</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether the current document is IE in a documentMode older than 10.</p> </dl></div><div id="IE_DOC_PRE8" class="property"><dl><dt><a href="source/lib/atoms/userAgent.js.src.html#l186">IE_DOC_PRE8</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether the current document is IE in a documentMode older than 8.</p> </dl></div><div id="IE_DOC_PRE9" class="property"><dl><dt><a href="source/lib/atoms/userAgent.js.src.html#l203">IE_DOC_PRE9</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether the current document is IE in a documentMode older than 9.</p> </dl></div><div id="IOS" class="property"><dl><dt><a href="source/lib/atoms/userAgent.js.src.html#l152">IOS</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether we are on IOS.</p> </dl></div><div id="MOBILE" class="property"><dl><dt><a href="source/lib/atoms/userAgent.js.src.html#l162">MOBILE</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether we are on a mobile browser.</p> </dl></div><div id="SAFARI_6" class="property"><dl><dt><a href="source/lib/atoms/userAgent.js.src.html#l247">SAFARI_6</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether the current browser is Safari 6.</p> </dl></div><div id="WINDOWS_PHONE" class="property"><dl><dt><a href="source/lib/atoms/userAgent.js.src.html#l256">WINDOWS_PHONE</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether the current browser is Windows Phone.</p> </dl></div></article><nav><h3><a href="index.html" tabindex="2">Overview</a></h3><div><input type="checkbox" id="nav-modules" checked/><label for="nav-modules"><h3><span class="selectable" tabindex="2">Modules</span></h3></label><div id="nav-modules-view"></div></div><div><input type="checkbox" id="nav-types" checked/><label for="nav-types"><h3><span class="selectable" tabindex="2">Types</span></h3></label><div id="nav-types-view"></div></div><h3><a href="Changes.html" tabindex="2">Changes</a></h3></nav></main><footer><div><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></div></footer><script src="types.js"></script><script src="dossier.js"></script>