safeframe
Version:
SafeFrame provides a consistent JS API to include 3rd party content
946 lines (564 loc) • 30.9 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="generator" content="JsDoc Toolkit" />
<title>$sf.env.ua | SafeFrames JS API</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<meta name="mobileoptimized" content="0" />
<link rel="stylesheet" href="../css/all.css" media="all" />
<link rel="stylesheet" href="../css/handheld.css" media="only screen and (max-width: 660px)" />
<link rel="stylesheet" href="../css/handheld.css" media="handheld" />
<link rel="stylesheet" href="../css/screen.css" media="screen and (min-width: 661px)" />
<script src="../javascript/all.js"></script>
<!--[if lt IE 9]>
<script src="../javascript/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="index">
<div class="menu">
<div class="indexLinks">
</div>
<h2 class="heading1">Classes</h2>
<input type="text" name="classFilter" class="classFilter" id="ClassFilter" placeholder="Filter"></input>
<nav>
<ul class="classList" id="ClassList">
<li><a href="../symbols/%24sf.html">$sf</a></li>
<li><a href="../symbols/%24sf.env.html">$sf<span class='break'> </span>.<span class='break'> </span>env</a></li>
<li><a href="../symbols/%24sf.env.ua.html">$sf<span class='break'> </span>.<span class='break'> </span>env<span class='break'> </span>.<span class='break'> </span>ua</a></li>
<li><a href="../symbols/%24sf.lib.html">$sf<span class='break'> </span>.<span class='break'> </span>lib</a></li>
<li><a href="../symbols/%24sf.lib.dom.html">$sf<span class='break'> </span>.<span class='break'> </span>lib<span class='break'> </span>.<span class='break'> </span>dom</a></li>
<li><a href="../symbols/%24sf.lib.dom.iframes.html">$sf<span class='break'> </span>.<span class='break'> </span>lib<span class='break'> </span>.<span class='break'> </span>dom<span class='break'> </span>.<span class='break'> </span>iframes</a></li>
<li><a href="../symbols/%24sf.lib.dom.msghost.html">$sf<span class='break'> </span>.<span class='break'> </span>lib<span class='break'> </span>.<span class='break'> </span>dom<span class='break'> </span>.<span class='break'> </span>msghost</a></li>
<li><a href="../symbols/%24sf.lib.lang.html">$sf<span class='break'> </span>.<span class='break'> </span>lib<span class='break'> </span>.<span class='break'> </span>lang</a></li>
<li><a href="../symbols/%24sf.lib.lang.ParamHash.html">$sf<span class='break'> </span>.<span class='break'> </span>lib<span class='break'> </span>.<span class='break'> </span>lang<span class='break'> </span>.<span class='break'> </span>ParamHash</a></li>
<li><a href="../symbols/%24sf.pub.html">$sf<span class='break'> </span>.<span class='break'> </span>pub</a></li>
<li><a href="../symbols/%24sf.pub.Config.html">$sf<span class='break'> </span>.<span class='break'> </span>pub<span class='break'> </span>.<span class='break'> </span>Config</a></li>
<li><a href="../symbols/%24sf.pub.PosConfig.html">$sf<span class='break'> </span>.<span class='break'> </span>pub<span class='break'> </span>.<span class='break'> </span>PosConfig</a></li>
<li><a href="../symbols/%24sf.pub.Position.html">$sf<span class='break'> </span>.<span class='break'> </span>pub<span class='break'> </span>.<span class='break'> </span>Position</a></li>
<li><a href="../symbols/%24sf.vend.html">$sf<span class='break'> </span>.<span class='break'> </span>vend</a></li>
</ul>
</nav>
</div>
<div class="fineprint" style="clear:both">
<footer>
Documentation generator: <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0<br />
Template: <a href="" target="_blank">Codeview</a> 1.2.1<br />
Generated on:
<time datetime='2012-7-6' pubdate>2012-7-6 16:05</time>
</footer>
</div>
</div>
<div class="index indexStatic"></div>
<div class="content">
<div class="innerContent">
<article>
<header>
<h1 class="classTitle">
Namespace <span>$sf.env.ua</span>
</h1>
<div class="intro">
<p class="description summary">
$sf.env.ua Stores browser / user-agent information
</p>
<ul class="summary">
</ul>
</div>
</header>
<section>
<nav>
<div class="props">
<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class $sf.env.ua.">
<caption class="sectionTitle">Field Summary</caption>
<thead>
<tr>
<th scope="col">Field Attributes</th>
<th scope="col">Field Name and Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.accel">accel</a></b>
</div>
<div class="description">Whether or not the browser / environment in question is hardware accelerated.</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.air">air</a></b>
</div>
<div class="description">The major version number of the AIR SDK being used, or 0 if not.</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.android">android</a></b>
</div>
<div class="description">The major version number of the Android OS being used, or 0 if not.</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.cajaVersion">cajaVersion</a></b>
</div>
<div class="description">The major version number of the CAJA environment or 0 if not</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.chrome">chrome</a></b>
</div>
<div class="description">The major version number of the Chrome browser being used, or 0 if not.</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.gecko">gecko</a></b>
</div>
<div class="description">The major version number of the Gecko (Firefox) browser being used, or 0 if not.</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.ie">ie</a></b>
</div>
<div class="description">The major version number of the Internet Explorer browser being used, or 0 if not.</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.ios">ios</a></b>
</div>
<div class="description">The major version number of the iOS being used, or 0 if not.</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.ipad">ipad</a></b>
</div>
<div class="description">Whether or not an iPad device is being used, 0 for false, > 0 == true</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.iphone">iphone</a></b>
</div>
<div class="description">Whether or not an iPhone device is being used, 0 for false, > 0 == true</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.ipod">ipod</a></b>
</div>
<div class="description">Whether or not an iPod device is being used, 0 for false, > 0 == true</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.mobile">mobile</a></b>
</div>
<div class="description">A string representing whether or not the browser / os is a mobile device and it's type.</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.nodejs">nodejs</a></b>
</div>
<div class="description">The major version number of the NodeJS environment being used, or 0 if not.</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.opera">opera</a></b>
</div>
<div class="description">The major version number of the Opera browser being used, or 0 if not.</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.phantomjs">phantomjs</a></b>
</div>
<div class="description">The major version number of the PhantomJS environment being used, or 0 if not.</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.safari">safari</a></b>
</div>
<div class="description">The major version number of the Safari browser being used, or 0 if not.</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.silk">silk</a></b>
</div>
<div class="description">The major version number of the Silk browser being used, or 0 if not.</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.webkit">webkit</a></b>
</div>
<div class="description">The major version number of the WebKit browser being used, or 0 if not.</div>
</td>
</tr>
<tr>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">
$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.webos">webos</a></b>
</div>
<div class="description">The major version number of the WebOS being used, or 0 if not.</div>
</td>
</tr>
</tbody>
</table>
</div>
</nav>
</section>
<!--
#### METHODS SUMMARY
-->
<section>
<div class="props">
<h2 class="sectionTitle">Method Summary</h2>
<nav>
<table class="summaryTable" id="MethodsList" cellspacing="0" summary="A summary of the methods documented in the class $sf.env.ua.">
<thead>
<tr>
<th scope="col">Method Attributes</th>
<th scope="col">Method Name and Description</th>
</tr>
</thead>
<tbody>
<tr
class='item0'
>
<td class="attributes"><static> </td>
<td class="nameDescription">
<div class="fixedFont">$sf.env.ua.<b><a href="../symbols/%24sf.env.ua.html#.parse">parse</a></b>(subUA)
</div>
<div class="description">Parse a user-agent string from the browser and gather pertinent browser, and OS information</div>
</td>
</tr>
</tbody>
</table>
</nav>
</div>
</section>
<!--
#### EVENTS SUMMARY
-->
<!--
#### CONSTRUCTOR DETAILS
-->
<!--
#### FIELD DETAILS
-->
<section>
<div class="details props">
<div class="innerProps">
<h2 class="sectionTitle">
Field Detail
</h2>
<div class="fixedFont heading" id=".accel">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>accel</b>
</div>
<div class="description">
Whether or not the browser / environment in question is hardware accelerated.
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".air">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>air</b>
</div>
<div class="description">
The major version number of the AIR SDK being used, or 0 if not.
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".android">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>android</b>
</div>
<div class="description">
The major version number of the Android OS being used, or 0 if not.
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".cajaVersion">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>cajaVersion</b>
</div>
<div class="description">
The major version number of the CAJA environment or 0 if not
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".chrome">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>chrome</b>
</div>
<div class="description">
The major version number of the Chrome browser being used, or 0 if not.
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".gecko">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>gecko</b>
</div>
<div class="description">
The major version number of the Gecko (Firefox) browser being used, or 0 if not.
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".ie">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>ie</b>
</div>
<div class="description">
The major version number of the Internet Explorer browser being used, or 0 if not.
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".ios">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>ios</b>
</div>
<div class="description">
The major version number of the iOS being used, or 0 if not.
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".ipad">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>ipad</b>
</div>
<div class="description">
Whether or not an iPad device is being used, 0 for false, > 0 == true
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".iphone">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>iphone</b>
</div>
<div class="description">
Whether or not an iPhone device is being used, 0 for false, > 0 == true
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".ipod">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>ipod</b>
</div>
<div class="description">
Whether or not an iPod device is being used, 0 for false, > 0 == true
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".mobile">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>mobile</b>
</div>
<div class="description">
A string representing whether or not the browser / os is a mobile device and it's type. Possible values are 'windows', 'android', 'symbos', 'linux', 'macintosh', 'rhino', 'gecko', 'Apple', 'chrome'.
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".nodejs">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>nodejs</b>
</div>
<div class="description">
The major version number of the NodeJS environment being used, or 0 if not.
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".opera">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>opera</b>
</div>
<div class="description">
The major version number of the Opera browser being used, or 0 if not.<br />
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".phantomjs">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>phantomjs</b>
</div>
<div class="description">
The major version number of the PhantomJS environment being used, or 0 if not.
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".safari">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>safari</b>
</div>
<div class="description">
The major version number of the Safari browser being used, or 0 if not.
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".silk">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>silk</b>
</div>
<div class="description">
The major version number of the Silk browser being used, or 0 if not.
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".webkit">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>webkit</b>
</div>
<div class="description">
The major version number of the WebKit browser being used, or 0 if not.
</div>
<div class="hr"></div>
<div class="fixedFont heading" id=".webos">
<span class='lighter'>
<static>
</span>
<span class="light">$sf.env.ua.</span><b>webos</b>
</div>
<div class="description">
The major version number of the WebOS being used, or 0 if not.
</div>
</div>
</div>
</section>
<!--
#### METHOD DETAILS
-->
<section>
<div class="details props">
<div class="innerProps">
<h2 class="sectionTitle">
Method Detail
</h2>
<ul class="methodDetail" id="MethodDetail">
<li
class='item0'
>
<div class="fixedFont heading" id=".parse">
<span class='lighter'>
<static>
</span>
<span class="light">{Object, Number, Number, Number, Number, Number, Number, Number, Number, Number, Number, Number, Number, Number, Number, Number, String, Number, Boolean, Number}</span>
<span class="light">$sf.env.ua.</span><b>parse</b>(subUA)
</div>
<div class="description">
Parse a user-agent string from the browser and gather pertinent browser, and OS information
</div>
<dl class="detailList params">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{String}</span> <b>subUA</b>
<i>Optional</i>
</dt>
<dd>An alternate user-agent string to parse. If no valid string is passed in, function will return an object based on the known user-agent</dd>
</dl>
<dl class="detailList nomargin">
<dt class="heading">Returns:</dt>
<dd><span class="light fixedFont">{Object}</span> <b>parsed</b> Browser and OS information<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.ie The major version number of the Internet Explorer browser being used, or 0 if not.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.opera The major version number of the Opera browser being used, or 0 if not.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.gecko The major version number of the Gecko (Firefox) browser being used, or 0 if not.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.webkit The major version number of the WebKit browser being used, or 0 if not.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.safari The major version number of the Safari browser being used, or 0 if not.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.chrome The major version number of the Chrome browser being used, or 0 if not.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.air The major version number of the AIR SDK being used, or 0 if not.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.ipod Whether or not an iPod device is being used 1 for true, 0 for false.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.ipad Whether or not an iPad device is being used 1 for true, 0 for false.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.iphone Whether or not an iPhone device is being used 1 for true, 0 for false.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.android The major version number of the Android OS being used, or 0 if not.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.webos The major version number of the WebOS being used, or 0 if not.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.silk The major version number of the Silk browser being used, or 0 if not.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.nodejs The major version number of the NodeJS environment being used, or 0 if not.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.phantomjs The major version number of the PhantomJS environment being used, or 0 if not.<br /> </dd>
<dd><span class="light fixedFont">{String}</span> <b>parsed</b>.mobile A string representing whether or not the browser / os is a mobile device and it's type. Possible values are 'windows', 'android', 'symbos', 'linux', 'macintosh', 'rhino', 'gecko', 'Apple', 'chrome'.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.ios The major version number of the iOS being used, or 0 if not.<br /> </dd>
<dd><span class="light fixedFont">{Boolean}</span> <b>parsed</b>.accel Whether or not the browser / environment in question is hardware accelerated.<br /> </dd>
<dd><span class="light fixedFont">{Number}</span> <b>parsed</b>.cajaVersion The major version number of the CAJA environment or 0 if not.</dd>
</dl>
</li>
</ul>
</div>
</div>
</section>
<!--
#### EVENT DETAILS
-->
</article>
</div>
</div>
<script type="text/javascript">
wbos.CssTools.MediaQueryFallBack.LoadCss('../css/screen.css', '../css/handheld.css', 660)
codeview.classFilter.Init()
</script>
</body>
</html>