diff options
Diffstat (limited to 'files/it/web/api/xmlhttprequest/onreadystatechange/index.html')
| -rw-r--r-- | files/it/web/api/xmlhttprequest/onreadystatechange/index.html | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/files/it/web/api/xmlhttprequest/onreadystatechange/index.html b/files/it/web/api/xmlhttprequest/onreadystatechange/index.html deleted file mode 100644 index 1bbfb02852..0000000000 --- a/files/it/web/api/xmlhttprequest/onreadystatechange/index.html +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: XMLHttpRequest.onreadystatechange -slug: Web/API/XMLHttpRequest/onreadystatechange -translation_of: Web/API/XMLHttpRequest/onreadystatechange ---- -<div>{{APIRef}}</div> - -<p>UN <a href="/en-US/docs/Web/API/EventHandler" title="A possible way to get notified of Events of a particular type (such as click) for a given object is to specify an event handler using:"><code>EventHandler</code></a> che è invocato ogni volta che l'attributo <code>readyState </code>cambia. la callback è invocata dal thread dell'interfaccia utente. </p> - -<p>La proprietà <strong><code>XMLHttpRequest.onreadystatechange</code></strong> contiene l<code>'event handler </code>che deve essere invocato quando l'evento {{event("readystatechange")}} si verifica, ovvero ogni volta in cui la proprietà {{domxref("XMLHttpRequest.readyState", "readyState")}} del {{domxref("XMLHttpRequest")}} viene modificata.</p> - -<div class="warning"> -<p><strong>Warning:</strong> This should not be used with synchronous requests and must not be used from native code. .</p> -</div> - -<p>L'evento <code>readystatechange</code> non si verificherà se una richiesta <code>XMLHttpRequest</code> viene cancellata utilizzando il metodo <a href="/en-US/docs/Web/API/XMLHttpRequest/abort">abort()</a>.</p> - -<div class="note"> -<p>UPDATE: it's firing in the latest version of browsers (Firefox 51.0.1, Opera 43.0.2442.991, Safari 10.0.3 (12602.4.8), Chrome 54.0.2840.71, Edge, IE11). Example <a href="https://jsfiddle.net/merksam/ve5oc0gn/">here</a> - just reaload page few times.</p> -</div> - -<h2 id="Syntax" name="Syntax">Syntax</h2> - -<pre class="syntaxbox"><em>XMLHttpRequest</em>.onreadystatechange = <em>callback</em>;</pre> - -<h3 id="Values">Values</h3> - -<ul> - <li><code><em>callback</em></code> è la funzione che viene eseguita quando <code>readyState</code> cambia.</li> -</ul> - -<h2 id="Example" name="Example">Example</h2> - -<pre class="brush: js">var xhr = new XMLHttpRequest(), - method = "GET", - url = "https://developer.mozilla.org/"; - -xhr.open(<em>method</em>, <em>url</em>, true); -xhr.onreadystatechange = function () { - if(xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) { - console.log(xhr.responseText); - } -}; -xhr.send();</pre> - -<h2 id="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('XMLHttpRequest', '#handler-xhr-onreadystatechange')}}</td> - <td>{{Spec2('XMLHttpRequest')}}</td> - <td>WHATWG living standard</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">Browser compatibility</h2> - -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome(1)}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoDesktop(1.0)}}</td> - <td>{{CompatIe(7)}}<sup>[1]</sup></td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatSafari(1.2)}}</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>Edge</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>1.0</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Internet Explorer version 5 and 6 supported ajax calls using <code>ActiveXObject()</code>.</p> |
