aboutsummaryrefslogtreecommitdiff
path: root/files/it/web/api/event/currenttarget/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/it/web/api/event/currenttarget/index.html')
-rw-r--r--files/it/web/api/event/currenttarget/index.html99
1 files changed, 0 insertions, 99 deletions
diff --git a/files/it/web/api/event/currenttarget/index.html b/files/it/web/api/event/currenttarget/index.html
deleted file mode 100644
index 7fcc81f4b3..0000000000
--- a/files/it/web/api/event/currenttarget/index.html
+++ /dev/null
@@ -1,99 +0,0 @@
----
-title: Event.currentTarget
-slug: Web/API/Event/currentTarget
-translation_of: Web/API/Event/currentTarget
----
-<p>{{APIRef("DOM")}}</p>
-
-<p>Identifica l'elemento del DOM a cui è stato assegnato l'event handler diversamente dall' <code>event.target</code> che rappresenta l'elemento da cui è stato generato l'evento.</p>
-
-<h2 id="Esempio">Esempio</h2>
-
-<p>L' <code>event.currentTarget </code>risulta utile da usare quando si assegna lo stesso event handler a numerosi elementi.</p>
-
-<pre class="brush: js">function hide(e){
- e.currentTarget.style.visibility = "hidden";
- // When this function is used as an event handler: this === e.currentTarget
-}
-
-var ps = document.getElementsByTagName('p');
-
-for(var i = 0; i &lt; ps.length; i++){
- ps[i].addEventListener('click', hide, false);
-}
-
-// click around and make paragraphs disappear
-</pre>
-
-<h2 id="Specifiche">Specifiche</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th>Specification</th>
- <th>Status</th>
- <th>Comment</th>
- </tr>
- <tr>
- <td>{{SpecName("DOM2 Events", "#Events-Event-currentTarget", "Event.currentTarget")}}</td>
- <td>{{Spec2("DOM2 Events")}}</td>
- <td>Initial definition</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Compatibilità_Browser">Compatibilità Browser</h2>
-
-<p>{{CompatibilityTable}}</p>
-
-<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}}<sup>[1]</sup></td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>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>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<p>[1] Il modello degli eventi implementato dagli Internet Explorer da 6 a 8 è diverso. Gli event listerner sono attaccati attraverso il metodo non standard <code>element.attachEvent. </code>In questo modello non esiste un equivalente dell' <code>event.currentTarget</code> inoltre <code>this</code> è l'oggetto globale. Una possibile soluzione è quella di wrappare la gestione dell' <code>event.currentTarget </code>in una funzione che chiami la funzione di handler attraverso la <code>Function.prototype.call</code> passando come primo parametro l'elemento. In questo modo il valore associato allo <code>this</code> è quello aspettato.</p>
-
-<h2 id="Vedi_anche">Vedi anche</h2>
-
-<p><a href="/en-US/docs/Web/API/Event/Comparison_of_Event_Targets">Comparison of Event Targets</a></p>