selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
16 lines • 7.63 kB
HTML
<meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>goog.defineClass</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.defineClass</h1><a class="source" href="source/lib/goog/base.js.src.html#l2064">code »</a></header><section><p>Creates a restricted form of a Closure "class":
- from the compiler's perspective, the instance returned from the
constructor is sealed (no new properties may be added). This enables
better checks.
- the compiler will rewrite this definition to a form that is optimal
for type checking and optimization (initially this will be a more
traditional form).<h2>Main</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">defineClass <span class="args">( superClass, def )</span> ⇒ <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>superClass: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The superclass, Object or null.<dt>def: <code class="type"><a href="namespace_goog_defineClass.html#goog.defineClass.ClassDescriptor">goog.defineClass.ClassDescriptor</a></code><dd>An object literal describing the
the class. It may have the following properties:
"constructor": the constructor function
"statics": an object literal containing methods to add to the constructor
as "static" methods or a function that will receive the constructor
function as its only parameter to which static properties can
be added.
all other properties are added to the prototype.</dl><tr><th>Returns<tr><td><dl>The class constructor.</dl></table></div></div></div></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="typedefs"><h2>Type Definitions</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l2103">code »</a><a class="member" name="goog.defineClass.ClassDescriptor">goog.defineClass.ClassDescriptor</a> : <code class="type">(!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>|{constructor: !<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>}|{constructor: !<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>, statics: (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>|function(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>): void)})</code></div><div>No description.</div></summary></details></div></div></section><section id="static-functions"><h2>Global Functions</h2><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l2172">code »</a><span class="member"><a name="goog.defineClass.applyProperties_">goog.defineClass.applyProperties_</a> <span class="args">( target, source )</span></span></div></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>The object to add properties to.<dt>source: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>The object to copy properites from.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l2123">code »</a><span class="member"><a name="goog.defineClass.createSealingConstructor_">goog.defineClass.createSealingConstructor_</a> <span class="args">( ctr, superClass )</span> ⇒ <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code></span></div><p>If goog.defineClass.SEAL_CLASS_INSTANCES is enabled and Object.seal is
defined, this function will wrap the constructor in a function that seals the
results of the provided constructor function.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>ctr: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The constructor whose results maybe be sealed.<dt>superClass: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The superclass constructor.</dl><tr><th>Returns<tr><td><dl>The replacement constructor.</dl></table></div></details></div></div></section><section id="static-properties"><h2>Global Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l2155">code »</a><span class="member"><a name="goog.defineClass.OBJECT_PROTOTYPE_FIELDS_">goog.defineClass.OBJECT_PROTOTYPE_FIELDS_</a> : <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code></span></div><p>The names of the fields that are defined on Object.prototype.</summary></details></div></div></section><section id="compiler-constants"><h2>Compiler Constants</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/base.js.src.html#l2110">code »</a><span class="member"><a name="goog.defineClass.SEAL_CLASS_INSTANCES">goog.defineClass.SEAL_CLASS_INSTANCES</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div></summary></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>Loading</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>Loading</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>Loading</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>