From 0ce7202a706c9036eeea42c158f433c2b7940457 Mon Sep 17 00:00:00 2001 From: YujiSoftware Date: Thu, 3 Mar 2022 22:36:23 +0900 Subject: Migrate CompatibilityTable to Compat macro (es) (#4355) * Migrate CompatibilityTable to Compat macro (es) * Migrate to multiple Compat macro (es) --- .../object/defineproperty/index.html | 72 +--------------------- 1 file changed, 1 insertion(+), 71 deletions(-) (limited to 'files/es/web/javascript/reference/global_objects/object/defineproperty') diff --git a/files/es/web/javascript/reference/global_objects/object/defineproperty/index.html b/files/es/web/javascript/reference/global_objects/object/defineproperty/index.html index 7d7051764f..445e95d05c 100644 --- a/files/es/web/javascript/reference/global_objects/object/defineproperty/index.html +++ b/files/es/web/javascript/reference/global_objects/object/defineproperty/index.html @@ -332,77 +332,7 @@ console.log<

Compatibilidad con navegadores

-
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
CaracterísticaFirefox (Gecko)ChromeInternet ExplorerOperaSafari
Soporte Básico{{CompatGeckoDesktop("2")}}{{CompatChrome("5")}} (versiones previas sin testear){{CompatIE("9")}} ({{CompatIE("8")}}, pero solo con objetos DOM y con muchos comportamientos no estándares  See below.){{CompatOpera("11.60")}}{{CompatSafari("5.1")}} ({{CompatSafari("5")}}, but not on DOM objects)
-
- -
- - - - - - - - - - - - - - - - - - - -
CaracterísticaFirefox Mobile (Gecko)AndroidIE MobileOpera MobileSafari Mobile
Soporte Básico{{CompatGeckoMobile("2")}}{{CompatVersionUnknown}}{{CompatIE("9")}} and above{{CompatOperaMobile("11.50")}}{{CompatVersionUnknown}}
-
- -

Based on Kangax's compat tables.

- -

Redefining the length property of an Array object

- -

It is possible to redefine the {{jsxref("Array.length", "length")}} property of arrays, subject to the usual redefinition restrictions. (The {{jsxref("Array.length", "length")}} property is initially non-configurable, non-enumerable, and writable. Thus on an unaltered array it is possible to change the {{jsxref("Array.length", "length")}} property's value, or to make it non-writable. It is not allowed to change its enumerability or configurability, or if it is non-writable to change its value or writability.) However, not all browsers permit this redefinition.

- -

Firefox 4 through 22 will throw a {{jsxref("Global_Objects/TypeError", "TypeError")}} on any attempt whatsoever (whether permitted or not) to redefine the {{jsxref("Array.length", "length")}} property of an array.

- -

Versions of Chrome which implement Object.defineProperty() in some circumstances ignore a length value different from the array's current {{jsxref("Array.length", "length")}} property. In some circumstances changing writability seems to silently not work (and not throw an exception). Also, relatedly, some array-mutating methods like {{jsxref("Array.prototype.push")}} don't respect a non-writable length.

- -

Versions of Safari which implement Object.defineProperty() ignore a length value different from the array's current {{jsxref("Array.length", "length")}} property, and attempts to change writability execute without error but do not actually change the property's writability.

- -

Only Internet Explorer 9 and later, and Firefox 23 and later, appear to fully and correctly implement redefinition of the {{jsxref("Array.length", "length")}} property of arrays. For now, don't rely on redefining the {{jsxref("Array.length", "length")}} property of an array to either work, or to work in a particular manner. And even when you can rely on it, there's really no good reason to do so.

- -

Particularidades de Internet Explorer 8

- -

El método Object.defineProperty() de Internet Explorer sólo puede ser usado en objetos del DOM. Algunas explicaciones al respecto:

- - +{{Compat("javascript.builtins.Object.defineProperty")}}

See also

-- cgit v1.2.3-54-g00ecf