diff options
Diffstat (limited to 'files/it/web/javascript/reference/global_objects')
-rw-r--r-- | files/it/web/javascript/reference/global_objects/array/prototype/index.html | 203 | ||||
-rw-r--r-- | files/it/web/javascript/reference/global_objects/object/prototype/index.html | 215 | ||||
-rw-r--r-- | files/it/web/javascript/reference/global_objects/proxy/proxy/apply/index.html (renamed from files/it/web/javascript/reference/global_objects/proxy/handler/apply/index.html) | 0 | ||||
-rw-r--r-- | files/it/web/javascript/reference/global_objects/proxy/proxy/index.html (renamed from files/it/web/javascript/reference/global_objects/proxy/handler/index.html) | 0 | ||||
-rw-r--r-- | files/it/web/javascript/reference/global_objects/proxy/revocable/index.html (renamed from files/it/web/javascript/reference/global_objects/proxy/revocabile/index.html) | 0 | ||||
-rw-r--r-- | files/it/web/javascript/reference/global_objects/string/prototype/index.html | 179 |
6 files changed, 0 insertions, 597 deletions
diff --git a/files/it/web/javascript/reference/global_objects/array/prototype/index.html b/files/it/web/javascript/reference/global_objects/array/prototype/index.html deleted file mode 100644 index d4989792a8..0000000000 --- a/files/it/web/javascript/reference/global_objects/array/prototype/index.html +++ /dev/null @@ -1,203 +0,0 @@ ---- -title: Array.prototype -slug: Web/JavaScript/Reference/Global_Objects/Array/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/Array/prototype ---- -<div>{{JSRef}}</div> - -<p>La proprietà <strong><code>Array.prototype</code></strong> rappresenta il prototipo per il costruttore {{jsxref("Array")}} .</p> - -<div>{{js_property_attributes(0, 0, 0)}}</div> - -<h2 id="Description" name="Description">Descrizione</h2> - -<p>Le istanze {{jsxref("Array")}} ereditano da <code>Array.prototype</code>. Come con gli altri costruttori, si può cambiare il prototipo propagando i cambiamenti su tutte le sue istanze.</p> - -<p>Piccola curiosità: <code>Array.prototype</code> è un {{jsxref("Array")}}:</p> - -<pre class="brush: js">Array.isArray(Array.prototype); // true -</pre> - -<h2 id="Properties" name="Properties">Proprietà</h2> - -<dl> - <dt><code>Array.prototype.constructor</code></dt> - <dd>Restituisce il costruttore.</dd> - <dt>{{jsxref("Array.prototype.length")}}</dt> - <dd>Restituisce il numero di elementi in un array.</dd> -</dl> - -<h2 id="Methods" name="Methods">Metodi</h2> - -<h3 id="Mutator_methods" name="Mutator_methods">Metodi mutator</h3> - -<p>Questi metodi modificano l'array:</p> - -<dl> - <dt>{{jsxref("Array.prototype.copyWithin()")}} {{experimental_inline}}</dt> - <dd>Copia una sequenza di elementi dell'array all'interno dello stesso.</dd> - <dt>{{jsxref("Array.prototype.fill()")}} {{experimental_inline}}</dt> - <dd>Riempie le posizioni dell'array contenute tra 2 indici con un valore fisso.</dd> - <dt>{{jsxref("Array.prototype.pop()")}}</dt> - <dd>Rimuove e restituisce l'ultimo elemento dell'array.</dd> - <dt>{{jsxref("Array.prototype.push()")}}</dt> - <dd>Accoda uno o più elementi all'array e restituisce la lunghezza aggiornata dello stesso.</dd> - <dt>{{jsxref("Array.prototype.reverse()")}}</dt> - <dd>Inverte l'ordine delle posizioni degli elementi all'interno dell'array.</dd> - <dt>{{jsxref("Array.prototype.shift()")}}</dt> - <dd>Rimuove e resistuisce il primo elemento di un array.</dd> - <dt>{{jsxref("Array.prototype.sort()")}}</dt> - <dd>Ordina gli elementi di un array all'interno di esso e restituisce l'array.</dd> - <dt>{{jsxref("Array.prototype.splice()")}}</dt> - <dd>Aggiunge e/o rimuove elementi da un array.</dd> - <dt>{{jsxref("Array.prototype.unshift()")}}</dt> - <dd>Aggiunge uno o più elementi all'inizio di un array e restituisce la lunghezza aggiornata dello stesso.</dd> -</dl> - -<h3 id="Accessor_methods" name="Accessor_methods">Metodi accessor</h3> - -<p>Questi metodi non modificano l'array e ne restituiscono una sua rappresentazione.</p> - -<dl> - <dt>{{jsxref("Array.prototype.concat()")}}</dt> - <dd>Restituisce un nuovo array costituito dall'array stesso insieme ad altri array/valori.</dd> - <dt>{{jsxref("Array.prototype.includes()")}} {{experimental_inline}}</dt> - <dd>Restituisce <code>true</code> se l'array contiene un certo elemento, <code>false</code> altrimenti.</dd> - <dt>{{jsxref("Array.prototype.join()")}}</dt> - <dd>Resituisce i valori dell'array come stringa.</dd> - <dt>{{jsxref("Array.prototype.slice()")}}</dt> - <dd>Restituisce un nuovo array cosituito da elementi dell'array originale.</dd> - <dt>{{jsxref("Array.prototype.toSource()")}} {{non-standard_inline}}</dt> - <dd>Returns an array literal representing the specified array; you can use this value to create a new array. Overrides the {{jsxref("Object.prototype.toSource()")}} method.</dd> - <dt>{{jsxref("Array.prototype.toString()")}}</dt> - <dd>Returns a string representing the array and its elements. Overrides the {{jsxref("Object.prototype.toString()")}} method.</dd> - <dt>{{jsxref("Array.prototype.toLocaleString()")}}</dt> - <dd>Returns a localized string representing the array and its elements. Overrides the {{jsxref("Object.prototype.toLocaleString()")}} method.</dd> - <dt>{{jsxref("Array.prototype.indexOf()")}}</dt> - <dd>Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.</dd> - <dt>{{jsxref("Array.prototype.lastIndexOf()")}}</dt> - <dd>Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.</dd> -</dl> - -<h3 id="Iteration_methods" name="Iteration_methods">Iteration methods</h3> - -<p>Several methods take as arguments functions to be called back while processing the array. When these methods are called, the <code>length</code> of the array is sampled, and any element added beyond this length from within the callback is not visited. Other changes to the array (setting the value of or deleting an element) may affect the results of the operation if the method visits the changed element afterwards. While the specific behavior of these methods in such cases is well-defined, you should not rely upon it so as not to confuse others who might read your code. If you must mutate the array, copy into a new array instead.</p> - -<dl> - <dt>{{jsxref("Array.prototype.forEach()")}}</dt> - <dd>Calls a function for each element in the array.</dd> - <dt>{{jsxref("Array.prototype.entries()")}} {{experimental_inline}}</dt> - <dd>Returns a new <code>Array Iterator</code> object that contains the key/value pairs for each index in the array.</dd> - <dt>{{jsxref("Array.prototype.every()")}}</dt> - <dd>Returns true if every element in this array satisfies the provided testing function.</dd> - <dt>{{jsxref("Array.prototype.some()")}}</dt> - <dd>Returns true if at least one element in this array satisfies the provided testing function.</dd> - <dt>{{jsxref("Array.prototype.filter()")}}</dt> - <dd>Creates a new array with all of the elements of this array for which the provided filtering function returns true.</dd> - <dt>{{jsxref("Array.prototype.find()")}} {{experimental_inline}}</dt> - <dd>Returns the found value in the array, if an element in the array satisfies the provided testing function or <code>undefined</code> if not found.</dd> - <dt>{{jsxref("Array.prototype.findIndex()")}} {{experimental_inline}}</dt> - <dd>Returns the found index in the array, if an element in the array satisfies the provided testing function or -1 if not found.</dd> - <dt>{{jsxref("Array.prototype.keys()")}} {{experimental_inline}}</dt> - <dd>Returns a new <code>Array Iterator</code> that contains the keys for each index in the array.</dd> - <dt>{{jsxref("Array.prototype.map()")}}</dt> - <dd>Creates a new array with the results of calling a provided function on every element in this array.</dd> - <dt>{{jsxref("Array.prototype.reduce()")}}</dt> - <dd>Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value.</dd> - <dt>{{jsxref("Array.prototype.reduceRight()")}}</dt> - <dd>Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value.</dd> - <dt>{{jsxref("Array.prototype.values()")}} {{experimental_inline}}</dt> - <dd>Returns a new <code>Array Iterator</code> object that contains the values for each index in the array.</dd> - <dt>{{jsxref("Array.prototype.@@iterator()", "Array.prototype[@@iterator]()")}} {{experimental_inline}}</dt> - <dd>Returns a new <code>Array Iterator</code> object that contains the values for each index in the array.</dd> -</dl> - -<h3 id="Generic_methods" name="Generic_methods">Generic methods</h3> - -<p>Many methods on the JavaScript Array object are designed to be generally applied to all objects which “look like” Arrays. That is, they can be used on any object which has a <code>length</code> property, and which can usefully be accessed using numeric property names (as with <code>array[5]</code> indexing). <span class="comment">TODO: give examples with Array.prototype.forEach.call, and adding the method to an object like {{jsxref("Global_Objects/JavaArray", "JavaArray")}} or {{jsxref("Global_Objects/String", "String")}}.</span> Some methods, such as {{jsxref("Array.join", "join")}}, only read the <code>length</code> and numeric properties of the object they are called on. Others, like {{jsxref("Array.reverse", "reverse")}}, require that the object's numeric properties and <code>length</code> be mutable; these methods can therefore not be called on objects like {{jsxref("String")}}, which does not permit its <code>length</code> property or synthesized numeric properties to be set.</p> - -<h2 id="Specifications" name="Specifications">Specifications</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName('ES1')}}</td> - <td>{{Spec2('ES1')}}</td> - <td>Initial definition.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.4.3.1', 'Array.prototype')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-array.prototype', 'Array.prototype')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2> - -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="See_also" name="See_also">See also</h2> - -<ul> - <li>{{jsxref("Array")}}</li> - <li>{{jsxref("Function.prototype")}}</li> -</ul> diff --git a/files/it/web/javascript/reference/global_objects/object/prototype/index.html b/files/it/web/javascript/reference/global_objects/object/prototype/index.html deleted file mode 100644 index 568165d0be..0000000000 --- a/files/it/web/javascript/reference/global_objects/object/prototype/index.html +++ /dev/null @@ -1,215 +0,0 @@ ---- -title: Object.prototype -slug: Web/JavaScript/Reference/Global_Objects/Object/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/Object -translation_of_original: Web/JavaScript/Reference/Global_Objects/Object/prototype ---- -<div>{{JSRef("Global_Objects", "Object")}}</div> - -<h2 id="Summary" name="Summary">Sommario</h2> - -<p>La proprietà <strong><code>Object.prototype</code></strong> rappresenta l'oggetto prototipo di {{jsxref("Global_Objects/Object", "Object")}}.</p> - -<p>{{js_property_attributes(0, 0, 0)}}</p> - -<h2 id="Description" name="Description">Descrizione</h2> - -<p>In JavaScript, tutti gli oggetti sono discendenti di {{jsxref("Global_Objects/Object", "Object")}}; tutti gli oggetti ereditano metodi e proprietà di <code>Object.prototype</code> (tranne nel caso l'oggetto abbia il prototipo uguale a {{jsxref("Global_Objects/null", "null")}}, quindi creati con il metodo {{jsxref("Object.create", "Object.create(null)")}}), anche se questi possono essere sovrascritti. Per esempio, i prototipi degli altri costruttori sovrascrivono la proprietà <code>constructor</code> e forniscono un loro metodo {{jsxref("Object.prototype.toString", "toString()")}}. I cambiamenti al prototipo di Object vengono estesi a tutti gli oggetti, eccetto quelli che sovrascrivono le proprietà e i metodi cambiati.</p> - -<h2 id="Properties" name="Properties">Proprietà</h2> - -<dl> - <dt>{{jsxref("Object.prototype.constructor")}}</dt> - <dd>Specifica la funzione che ha creato l'oggetto a partire dal prototipo.</dd> - <dt>{{jsxref("Object.prototype.__proto__")}} {{non-standard_inline}}</dt> - <dd>È un riferimento all'oggetto usato come prototipo quando l'oggetto è stato istanziato.</dd> - <dt>{{jsxref("Object.prototype.__noSuchMethod__")}} {{non-standard_inline}}</dt> - <dd>Permette di definire una funzione che venga chiamata quando viene chiamato un metodo non definito.</dd> - <dt><s class="obsoleteElement">{{jsxref("Object.prototype.__count__")}} {{obsolete_inline}}</s></dt> - <dd><s class="obsoleteElement">Rappresenta il numero di proprietà persenti in un oggetto, ma è stato rimosso.</s></dd> - <dt><s class="obsoleteElement">{{jsxref("Object.prototype.__parent__")}} {{obsolete_inline}}</s></dt> - <dd><s class="obsoleteElement">Rappresenta il contesto di un oggetto, ma è stato rimosso.</s></dd> -</dl> - -<h2 id="Methods" name="Methods">Metodi</h2> - -<dl> - <dt>{{jsxref("Object.prototype.__defineGetter__()")}} {{non-standard_inline}} {{deprecated_inline}}</dt> - <dd>Associa una funzione a una proprietà di un oggetto. Quando si tenta di leggere il valore di tale proprietà, viene eseguita la funzione e restituito il valore che restituisce.</dd> - <dt>{{jsxref("Object.prototype.__defineSetter__()")}} {{non-standard_inline}} {{deprecated_inline}}</dt> - <dd>Associa una funzione a una proprietà di un oggetto. Quando si tenta di cambiare il valore di tale proprietà, viene eseguita la funzione.</dd> - <dt>{{jsxref("Object.prototype.__lookupGetter__()")}} {{non-standard_inline}} {{deprecated_inline}}</dt> - <dd>Restituisce la funzione definita tramite {{jsxref("Object.prototype.defineGetter", "__defineGetter__()")}}.</dd> - <dt>{{jsxref("Object.prototype.__lookupSetter__()")}} {{non-standard_inline}} {{deprecated_inline}}</dt> - <dd>Restituisce la funzione definita tramite {{jsxref("Object.prototype.defineSetter", "__defineSetter__()")}}.</dd> - <dt>{{jsxref("Object.prototype.hasOwnProperty()")}}</dt> - <dd>Determina se l'oggetto contiene direttamente una proprietà (non ereditata tramite il prototipo).</dd> - <dt>{{jsxref("Object.prototype.isPrototypeOf()")}}</dt> - <dd>Determina se un oggetto fa parte della catena dei prototipi dell'oggetto sul quale è richiamato questo metodo.</dd> - <dt>{{jsxref("Object.prototype.propertyIsEnumerable()")}}</dt> - <dd>Determina se l'<a href="/it/docs/ECMAScript_DontEnum_attribute" title="ECMAScript_DontEnum_attribute">attributo DontEnum di ECMAScript</a> interno è presente.</dd> - <dt>{{jsxref("Object.prototype.toSource()")}} {{non-standard_inline}}</dt> - <dd>Restituisce una stringa contenente il codice sorgente di un oggetto rappresentante l'oggetto sul quale questo metodo viene richiamato; puoi usare questo valore per creare un nuovo oggetto.</dd> - <dt>{{jsxref("Object.prototype.toLocaleString()")}}</dt> - <dd>Richiama {{jsxref("Object.prototype.toString", "toString()")}}.</dd> - <dt>{{jsxref("Object.prototype.toString()")}}</dt> - <dd>Restituisce la rappresentazione dell'oggetto sotto forma di stringa.</dd> - <dt>{{jsxref("Object.prototype.unwatch()")}} {{non-standard_inline}}</dt> - <dd>Termina di osservare i cambiamenti di una proprietà dell'oggetto.</dd> - <dt>{{jsxref("Object.prototype.valueOf()")}}</dt> - <dd>Ritorna il valore primitivo dell'oggetto.</dd> - <dt>{{jsxref("Object.prototype.watch()")}} {{non-standard_inline}}</dt> - <dd>Inizia a osservare i cambiamenti di una proprietà di un oggetto.</dd> - <dt><s class="obsoleteElement">{{jsxref("Object.prototype.eval()")}} {{obsolete_inline}}</s></dt> - <dd><s class="obsoleteElement">Esegue una stringa di codice JavaScript nel contesto dell'oggetto, ma è stato rimosso.</s></dd> -</dl> - -<h2 id="Examples" name="Examples">Esempi</h2> - -<p>Siccome in JavaScript gli oggetti non sono sub-classabili in modo "standard", il prototipo è una soluzione utile per creare un oggetto che funzioni da "classe di base" che contenga dei metodi comuni a più oggetti. Per esempio:</p> - -<pre class="brush: js">var Persona = function() { - this.saParlare = true; -}; - -Persona.prototype.saluta = function() { - if (this.saParlare) { - console.log('Ciao, mi chiamo ' + this.nome); - } -}; - -var Dipendente = function(nome, titolo) { - Persona.call(this); - this.nome = nome; - this.titolo = titolo; -}; - -Dipendente.prototype = Object.create(Persona.prototype); -Dipendente.prototype.constructor = Dipendente; - -Dipendente.prototype.saluta = function() { - if (this.saParlare) { - console.log('Ciao mi chiamo ' + this.nome + ' e lavoro come ' + this.titolo); - } -}; - -var Cliente = function(nome) { - Persona.call(this); - this.nome = nome; -}; - -Cliente.prototype = Object.create(Persona.prototype); -Cliente.prototype.constructor = Cliente; - -var Mimo = function(nome) { - Persona.call(this); - this.nome = nome; - this.saParlare = false; -}; - -Mimo.prototype = Object.create(Persona.prototype); -Mimo.prototype.constructor = Mimo; - -var bob = new Dipendente('Bob', 'Architetto'); -var joe = new Cliente('Joe'); -var rg = new Dipendente('Red Green', 'Tuttofare'); -var mike = new Cliente('Mike'); -var mime = new Mimo('Mimo'); -bob.saluta(); -joe.saluta(); -rg.saluta(); -mike.saluta(); -mime.saluta(); -</pre> - -<p>Stamperà:</p> - -<pre>Ciao, mi chiamo Bob e lavoro come Architetto -Ciao, mi chiamo Joe -Ciao, mi chiamo Red Green, e lavoro come Tuttofare -Ciao, mi chiamo Mike</pre> - -<h2 id="Specifications" name="Specifications">Specifiche</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Specifica</th> - <th scope="col">Stato</th> - <th scope="col">Commenti</th> - </tr> - <tr> - <td>ECMAScript 1st Edition. Implemented in JavaScript 1.0.</td> - <td>Standard</td> - <td>Definizione iniziale.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.2.3.1', 'Object.prototype')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-object.prototype', 'Object.prototype')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility" name="Browser_compatibility">Compatibilità con i browser</h2> - -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Funzionalità</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Supporto di base</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th><span style="font-family: open sans light,sans-serif; font-size: 16px; line-height: 16px;">Funzionalità</span></th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td><span style="font-size: 12px; line-height: 18px;">Supporto di base</span></td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="See_also">See also</h2> - -<ul> - <li><a href="/it/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript">Introduzione alla programmazione JavaScript orientata agli oggetti</a></li> -</ul> diff --git a/files/it/web/javascript/reference/global_objects/proxy/handler/apply/index.html b/files/it/web/javascript/reference/global_objects/proxy/proxy/apply/index.html index f803b41255..f803b41255 100644 --- a/files/it/web/javascript/reference/global_objects/proxy/handler/apply/index.html +++ b/files/it/web/javascript/reference/global_objects/proxy/proxy/apply/index.html diff --git a/files/it/web/javascript/reference/global_objects/proxy/handler/index.html b/files/it/web/javascript/reference/global_objects/proxy/proxy/index.html index 2be6abb116..2be6abb116 100644 --- a/files/it/web/javascript/reference/global_objects/proxy/handler/index.html +++ b/files/it/web/javascript/reference/global_objects/proxy/proxy/index.html diff --git a/files/it/web/javascript/reference/global_objects/proxy/revocabile/index.html b/files/it/web/javascript/reference/global_objects/proxy/revocable/index.html index bf87d7e3e7..bf87d7e3e7 100644 --- a/files/it/web/javascript/reference/global_objects/proxy/revocabile/index.html +++ b/files/it/web/javascript/reference/global_objects/proxy/revocable/index.html diff --git a/files/it/web/javascript/reference/global_objects/string/prototype/index.html b/files/it/web/javascript/reference/global_objects/string/prototype/index.html deleted file mode 100644 index c83cec2a54..0000000000 --- a/files/it/web/javascript/reference/global_objects/string/prototype/index.html +++ /dev/null @@ -1,179 +0,0 @@ ---- -title: String.prototype -slug: Web/JavaScript/Reference/Global_Objects/String/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/String -translation_of_original: Web/JavaScript/Reference/Global_Objects/String/prototype ---- -<div>{{JSRef}}</div> - -<p>La proprietà <strong><code>String.prototype</code></strong>rappresenta l'oggetto prototipo {{jsxref("String")}}.</p> - -<div>{{js_property_attributes(0, 0, 0)}}</div> - -<h2 id="Description">Description</h2> - -<p>Tutte le istanze {{jsxref("String")}} ereditano da <code>String.prototype</code> . Le modifiche all'oggetto prototipo <code>String</code> vengono propagate a tutte le istanze {{jsxref("String")}}.</p> - -<h2 id="Properties">Properties</h2> - -<dl> - <dt><code>String.prototype.constructor</code></dt> - <dd>Specifica la funzione che crea il prototipo di un oggetto.</dd> - <dt>{{jsxref("String.prototype.length")}}</dt> - <dd>Riflette la lunghezza della stringa.</dd> - <dt><code><em>N</em></code></dt> - <dd>Utilizzato per accedere al carattere in <em>N</em> posizione in cui <em>N</em> è un numero intero positivo compreso tra 0 e uno inferiore al valore della {{jsxref("String.length", "length")}}. Queste proprietà sono di sola lettura.</dd> -</dl> - -<h2 id="Metodi">Metodi</h2> - -<h3 id="Metodi_non_correlati_HTML">Metodi non correlati HTML</h3> - -<dl> - <dt>{{jsxref("String.prototype.charAt()")}}</dt> - <dd>Restituisce il carattere (esattamente un'unità di codice UTF-16) all'indice specificato</dd> - <dt>{{jsxref("String.prototype.charCodeAt()")}}</dt> - <dd>Restituisce un numero che corrisponde al valore dell'unità di codice UTF-16 nell'indice specificato.</dd> - <dt>{{jsxref("String.prototype.codePointAt()")}}</dt> - <dd>Restituisce un numero intero non negativo <strong>Numero</strong> che è il valore del punto di codice codificato UTF-16 che inizia con l'indice specificato.</dd> - <dt>{{jsxref("String.prototype.concat()")}}</dt> - <dd>Combina il testo di due stringhe e restituisce una nuova stringa.</dd> - <dt>{{jsxref("String.prototype.includes()")}}</dt> - <dd>Determina se una stringa può essere trovata all'interno di un'altra stringa.</dd> - <dt>{{jsxref("String.prototype.endsWith()")}}</dt> - <dd>Determina se una stringa termina con i caratteri di un'altra stringa.</dd> - <dt>{{jsxref("String.prototype.indexOf()")}}</dt> - <dd>Restituisce l'indice all'interno dell'oggetto {{jsxref("String")}} chiamante della prima occorrenza del valore specificato o -1 se non trovato.</dd> - <dt>{{jsxref("String.prototype.lastIndexOf()")}}</dt> - <dd>Restituisce l'indice all'interno dell'oggetto {{jsxref("String")}} chiamante della prima occorrenza del valore specificato o -1 se non trovato.</dd> - <dt>{{jsxref("String.prototype.localeCompare()")}}</dt> - <dd>Restituisce un numero che indica se una stringa di riferimento viene prima o dopo o è uguale alla stringa specificata in ordine di ordinamento.</dd> - <dt>{{jsxref("String.prototype.match()")}}</dt> - <dd>Utilizzato per abbinare un'espressione regolare a una stringa.</dd> - <dt>{{jsxref("String.prototype.normalize()")}}</dt> - <dd>Restituisce il modulo di normalizzazione Unicode del valore della stringa chiamante.</dd> - <dt>{{jsxref("String.prototype.padEnd()")}}</dt> - <dd>Riempie la stringa corrente dalla fine con una determinata stringa per creare una nuova stringa di una determinata lunghezza.</dd> - <dt>{{jsxref("String.prototype.padStart()")}}</dt> - <dd>Riempie la stringa corrente dall'inizio con una determinata stringa per creare una nuova stringa da una determinata lunghezza.</dd> - <dt><s class="obsoleteElement">{{jsxref("String.prototype.quote()")}} {{obsolete_inline}}</s></dt> - <dd><s class="obsoleteElement">Avvolge la stringa tra virgolette ("<code>"</code>").</s></dd> - <dt>{{jsxref("String.prototype.repeat()")}}</dt> - <dd>Restituisce una stringa composta da elementi dell'oggetto ripetuti i tempi indicati.</dd> - <dt>{{jsxref("String.prototype.replace()")}}</dt> - <dd>Utilizzato per trovare una corrispondenza tra un'espressione regolare e una stringa e per sostituire la sottostringa con corrispondenza con una nuova sottostringa.</dd> - <dt>{{jsxref("String.prototype.search()")}}</dt> - <dd>Esegue la ricerca di una corrispondenza tra un'espressione regolare e una stringa specificata.</dd> - <dt>{{jsxref("String.prototype.slice()")}}</dt> - <dd>Estrae una sezione di una stringa e restituisce una nuova stringa.</dd> - <dt>{{jsxref("String.prototype.split()")}}</dt> - <dd>Divide un oggetto {{jsxref("Global_Objects/String", "String")}} in una matrice di stringhe separando la stringa in sottostringhe.</dd> - <dt>{{jsxref("String.prototype.startsWith()")}}</dt> - <dd>Determina se una stringa inizia con i caratteri di un'altra stringa.</dd> - <dt>{{jsxref("String.prototype.substr()")}} {{deprecated_inline}}</dt> - <dd>Restituisce i caratteri in una stringa che inizia nella posizione specificata attraverso il numero specificato di caratteri.</dd> - <dt>{{jsxref("String.prototype.substring()")}}</dt> - <dd>Restituisce i caratteri in una stringa tra due indici nella stringa.</dd> - <dt>{{jsxref("String.prototype.toLocaleLowerCase()")}}</dt> - <dd>I caratteri all'interno di una stringa vengono convertiti in minuscolo rispettando le impostazioni locali correnti. Per la maggior parte delle lingue, questo restituirà lo stesso di {{jsxref("String.prototype.toLowerCase()", "toLowerCase()")}}.</dd> - <dt>{{jsxref("String.prototype.toLocaleUpperCase()")}}</dt> - <dd>I caratteri all'interno di una stringa vengono convertiti in maiuscolo rispettando le impostazioni locali correnti. Per la maggior parte delle lingue, ciò restituirà lo stesso di {{jsxref("String.prototype.toUpperCase()", "toUpperCase()")}}.</dd> - <dt>{{jsxref("String.prototype.toLowerCase()")}}</dt> - <dd>Restituisce il valore della stringa chiamante convertito in minuscolo.</dd> - <dt>{{jsxref("String.prototype.toSource()")}} {{non-standard_inline}}</dt> - <dd>Restituisce un oggetto letterale che rappresenta l'oggetto specificato; puoi usare questo valore per creare un nuovo oggetto. Sostituisce il metodo {{jsxref("Object.prototype.toSource()")}} method.</dd> - <dt>{{jsxref("String.prototype.toString()")}}</dt> - <dd>Restituisce una stringa che rappresenta l'oggetto specificato. Sostituisce il metodo {{jsxref("Object.prototype.toString()")}} .</dd> - <dt>{{jsxref("String.prototype.toUpperCase()")}}</dt> - <dd>Restituisce il valore della stringa chiamante convertito in maiuscolo.</dd> - <dt>{{jsxref("String.prototype.trim()")}}</dt> - <dd>Taglia gli spazi bianchi all'inizio e alla fine della stringa. Parte dello standard ECMAScript 5.</dd> - <dt>{{jsxref("String.prototype.trimStart()")}}<br> - {{jsxref("String.prototype.trimLeft()")}}</dt> - <dd>Taglia gli spazi bianchi dall'inizio della stringa.</dd> - <dt>{{jsxref("String.prototype.trimEnd()")}}<br> - {{jsxref("String.prototype.trimRight()")}}</dt> - <dd>Taglia gli spazi bianchi dalla fine della stringa.</dd> - <dt>{{jsxref("String.prototype.valueOf()")}}</dt> - <dd>Restituisce il valore primitivo dell'oggetto specificato. Sostituisce il metodo {{jsxref("Object.prototype.valueOf()")}}.</dd> - <dt>{{jsxref("String.prototype.@@iterator()", "String.prototype[@@iterator]()")}}</dt> - <dd>Restituisce un nuovo oggetto <code>Iterator</code> che itera sopra i punti di codice di un valore String, restituendo ogni punto di codice come valore String.</dd> -</dl> - -<h3 id="HTML_metodi_wrapper_(involucro)">HTML metodi wrapper (involucro)</h3> - -<p>Questi metodi sono di uso limitato, in quanto forniscono solo un sottoinsieme dei tag e degli attributi HTML disponibili.</p> - -<dl> - <dt>{{jsxref("String.prototype.anchor()")}} {{deprecated_inline}}</dt> - <dd>{{htmlattrxref("name", "a", "<a name=\"name\">")}} (hypertext target)</dd> - <dt>{{jsxref("String.prototype.big()")}} {{deprecated_inline}}</dt> - <dd>{{HTMLElement("big")}}</dd> - <dt>{{jsxref("String.prototype.blink()")}} {{deprecated_inline}}</dt> - <dd>{{HTMLElement("blink")}}</dd> - <dt>{{jsxref("String.prototype.bold()")}} {{deprecated_inline}}</dt> - <dd>{{HTMLElement("b")}}</dd> - <dt>{{jsxref("String.prototype.fixed()")}} {{deprecated_inline}}</dt> - <dd>{{HTMLElement("tt")}}</dd> - <dt>{{jsxref("String.prototype.fontcolor()")}} {{deprecated_inline}}</dt> - <dd>{{htmlattrxref("color", "font", "<font color=\"color\">")}}</dd> - <dt>{{jsxref("String.prototype.fontsize()")}} {{deprecated_inline}}</dt> - <dd>{{htmlattrxref("size", "font", "<font size=\"size\">")}}</dd> - <dt>{{jsxref("String.prototype.italics()")}} {{deprecated_inline}}</dt> - <dd>{{HTMLElement("i")}}</dd> - <dt>{{jsxref("String.prototype.link()")}} {{deprecated_inline}}</dt> - <dd>{{htmlattrxref("href", "a", "<a href=\"url\">")}} (link to URL)</dd> - <dt>{{jsxref("String.prototype.small()")}} {{deprecated_inline}}</dt> - <dd>{{HTMLElement("small")}}</dd> - <dt>{{jsxref("String.prototype.strike()")}} {{deprecated_inline}}</dt> - <dd>{{HTMLElement("strike")}}</dd> - <dt>{{jsxref("String.prototype.sub()")}} {{deprecated_inline}}</dt> - <dd>{{HTMLElement("sub")}}</dd> - <dt>{{jsxref("String.prototype.sup()")}} {{deprecated_inline}}</dt> - <dd>{{HTMLElement("sup")}}</dd> -</dl> - -<h2 id="Specificazioni">Specificazioni</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Specificazioni</th> - <th scope="col">Stato</th> - <th scope="col">Commento</th> - </tr> - <tr> - <td>{{SpecName('ES1')}}</td> - <td>{{Spec2('ES1')}}</td> - <td>Definizione iniziale.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.5.3.1', 'String.prototype')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-string.prototype', 'String.prototype')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ESDraft', '#sec-string.prototype', 'String.prototype')}}</td> - <td>{{Spec2('ESDraft')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilità_con_il_browser">Compatibilità con il browser</h2> - -<p class="hidden"> tabella di compatibilità in questa pagina è generata da dati strutturati. Se desideri contribuire ai dati, consulta <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> e inviaci una richiesta di pull.</p> - -<p>{{Compat("javascript.builtins.String.prototype")}}</p> - -<h2 id="Guarda_anche">Guarda anche</h2> - -<ul> - <li>{{jsxref("String")}}</li> - <li>{{jsxref("Function.prototype")}}</li> -</ul> |