diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2021-07-15 12:59:34 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-15 12:59:34 -0400 |
| commit | 3601b7bb982e958927e069715cfe07430bce7196 (patch) | |
| tree | d305ecdbf80ce8126386a0d7886f70d915277c7c /files/es/web/javascript/reference/global_objects/object | |
| parent | 9ace67d06f2369e3c770e3a11e06e1c8cc9f66fd (diff) | |
| download | translated-content-3601b7bb982e958927e069715cfe07430bce7196.tar.gz translated-content-3601b7bb982e958927e069715cfe07430bce7196.tar.bz2 translated-content-3601b7bb982e958927e069715cfe07430bce7196.zip | |
delete pages that were never translated from en-US (es, part 1) (#1547)
Diffstat (limited to 'files/es/web/javascript/reference/global_objects/object')
| -rw-r--r-- | files/es/web/javascript/reference/global_objects/object/__lookupgetter__/index.html | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/files/es/web/javascript/reference/global_objects/object/__lookupgetter__/index.html b/files/es/web/javascript/reference/global_objects/object/__lookupgetter__/index.html deleted file mode 100644 index d99273a3fe..0000000000 --- a/files/es/web/javascript/reference/global_objects/object/__lookupgetter__/index.html +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Object.prototype.__lookupGetter__() -slug: Web/JavaScript/Reference/Global_Objects/Object/__lookupGetter__ -translation_of: Web/JavaScript/Reference/Global_Objects/Object/__lookupGetter__ -original_slug: Web/JavaScript/Referencia/Objetos_globales/Object/__lookupGetter__ ---- -<div>{{JSRef}} {{deprecated_header}}</div> - -<p>Los <code><strong>__lookupGetter__</strong></code> metodos retornan la funcion enlazada como un getter para especificar la propiedad.</p> - -<h2 id="Syntax">Syntax</h2> - -<pre class="syntaxbox"><code><var>obj</var>.__lookupGetter__(<var>sprop</var>)</code></pre> - -<h3 id="Parameters">Parameters</h3> - -<dl> - <dt><code>sprop</code></dt> - <dd>A string containing the name of the property whose getter should be returned.</dd> -</dl> - -<h3 id="Return_value">Return value</h3> - -<p>The function bound as a getter to the specified property.</p> - -<h2 id="Description">Description</h2> - -<p>If a getter has been defined for an object's property, it's not possible to reference the getter function through that property, because that property refers to the return value of that function. <code>__lookupGetter__</code> can be used to obtain a reference to the getter function.</p> - -<p>It is now possible to do this in a standardized way using {{jsxref("Object.getOwnPropertyDescriptor()")}} and {{jsxref("Object.getPrototypeOf()")}}.</p> - -<h2 id="Examples">Examples</h2> - -<pre class="brush: js">var obj = { - get foo() { - return Math.random() > 0.5 ? 'foo' : 'bar'; - } -}; - - -// Non-standard and deprecated way -obj.__lookupGetter__('foo'); -// (function() { return Math.random() > 0.5 ? 'foo' : 'bar'; }) - - -// Standard-compliant way -Object.getOwnPropertyDescriptor(obj, "foo").get; -// (function() { return Math.random() > 0.5 ? 'foo' : 'bar'; }) -</pre> - -<h2 id="Specifications">Specifications</h2> - -<table class="spectable standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName('ESDraft', '#sec-object.prototype.__lookupGetter__', 'Object.prototype.__lookupGetter__()')}}</td> - <td>{{Spec2('ESDraft')}}</td> - <td>Included in the (normative) annex for additional ECMAScript legacy features for Web browsers (note that the specification codifies what is already in implementations).</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">Browser compatibility</h2> - -<div> - - -<p>{{Compat("javascript.builtins.Object.lookupGetter")}}</p> -</div> - -<h2 id="See_also">See also</h2> - -<ul> - <li>{{jsxref("Object.prototype.__lookupSetter__()")}}</li> - <li>{{jsxref("Functions/get", "get")}} operator</li> - <li>{{jsxref("Object.getOwnPropertyDescriptor()")}} and {{jsxref("Object.getPrototypeOf()")}}</li> - <li>{{jsxref("Object.prototype.__defineGetter__()")}}</li> - <li>{{jsxref("Object.prototype.__defineSetter__()")}}</li> - <li><a href="/en-US/docs/Web/JavaScript/Guide/Working_with_Objects#Defining_getters_and_setters">JS Guide: Defining Getters and Setters</a></li> -</ul> |
