From 4873c5f1122ac800cf3c916a52df07e05ddc9dcf Mon Sep 17 00:00:00 2001 From: MDN Date: Fri, 11 Feb 2022 00:58:37 +0000 Subject: [CRON] sync translated content --- files/pt-br/_redirects.txt | 1 + files/pt-br/_wikihistory.json | 14 +-- .../xmlhttprequest/onreadystatechange/index.html | 120 -------------------- .../readystatechange_event/index.html | 121 +++++++++++++++++++++ 4 files changed, 129 insertions(+), 127 deletions(-) delete mode 100644 files/pt-br/web/api/xmlhttprequest/onreadystatechange/index.html create mode 100644 files/pt-br/web/api/xmlhttprequest/readystatechange_event/index.html (limited to 'files/pt-br') diff --git a/files/pt-br/_redirects.txt b/files/pt-br/_redirects.txt index 82705e2d46..0c27857616 100644 --- a/files/pt-br/_redirects.txt +++ b/files/pt-br/_redirects.txt @@ -553,6 +553,7 @@ /pt-BR/docs/Web/API/WindowTimers/clearTimeout /pt-BR/docs/Web/API/clearTimeout /pt-BR/docs/Web/API/XMLHttpRequest/Requisicoes_sincronas_e_assincronas /pt-BR/docs/Web/API/XMLHttpRequest/Synchronous_and_Asynchronous_Requests /pt-BR/docs/Web/API/XMLHttpRequest/Usando_XMLHttpRequest /pt-BR/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest +/pt-BR/docs/Web/API/XMLHttpRequest/onreadystatechange /pt-BR/docs/Web/API/XMLHttpRequest/readystatechange_event /pt-BR/docs/Web/API/document.getElementById /pt-BR/docs/Web/API/Document/getElementById /pt-BR/docs/Web/API/document.images /pt-BR/docs/Web/API/Document/images /pt-BR/docs/Web/API/document.scripts /pt-BR/docs/Web/API/Document/scripts diff --git a/files/pt-br/_wikihistory.json b/files/pt-br/_wikihistory.json index a742393df3..50e955faf9 100644 --- a/files/pt-br/_wikihistory.json +++ b/files/pt-br/_wikihistory.json @@ -6920,13 +6920,6 @@ "gustavobeavis" ] }, - "Web/API/XMLHttpRequest/onreadystatechange": { - "modified": "2019-03-23T22:16:58.340Z", - "contributors": [ - "brunoczim", - "gustavobeavis" - ] - }, "Web/API/XMLHttpRequest/open": { "modified": "2020-10-15T22:03:41.298Z", "contributors": [ @@ -6941,6 +6934,13 @@ "gustavobeavis" ] }, + "Web/API/XMLHttpRequest/readystatechange_event": { + "modified": "2019-03-23T22:16:58.340Z", + "contributors": [ + "brunoczim", + "gustavobeavis" + ] + }, "Web/API/XMLHttpRequest/send": { "modified": "2020-10-15T22:05:47.894Z", "contributors": [ diff --git a/files/pt-br/web/api/xmlhttprequest/onreadystatechange/index.html b/files/pt-br/web/api/xmlhttprequest/onreadystatechange/index.html deleted file mode 100644 index fa3ca1c707..0000000000 --- a/files/pt-br/web/api/xmlhttprequest/onreadystatechange/index.html +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: XMLHttpRequest.onreadystatechange -slug: Web/API/XMLHttpRequest/onreadystatechange -tags: - - AJAX - - API - - Evento - - Manipulador de eventos - - XHR - - XMLHttpRequest -translation_of: Web/API/XMLHttpRequest/onreadystatechange ---- -
{{APIRef}}
- -

Um EventHandler é chamado sempre que o atributo readyState é modificado. O callback é chamado a partir da interface do usuário. A propriedade XMLHttpRequest.onreadystatechange contém o manipulador de eventos que é chamado quando o evento readystatechange é disparado, ou seja, toda vez que a propriedade {{domxref("XMLHttpRequest.readyState", "readyState")}} do {{domxref("XMLHttpRequest")}} é modificada.

- -
-

Atenção: Isso não deve ser usado com solicitações síncronas e não deve ser usado como código nativo.

-
- -

O evento readystatechange não será chamado quando a XMLHttpRequest request for cancelada pelo método abort().

- -
-

Atualização: Está disparando na última versão de navegadores (Firefox 51.0.1, Opera 43.0.2442.991, Safari 10.0.3 (12602.4.8), Chrome 54.0.2840.71, Edge, IE11). Exemplo aqui - basta recarregar a página algumas vezes.

-
- -

Sitaxe

- -
XMLHttpRequest.onreadystatechange = callback;
- -

Valores

- - - -

Exemplo

- -
var xhr = new XMLHttpRequest(),
-    method = "GET",
-    url = "https://developer.mozilla.org/";
-
-xhr.open(method, url, true);
-xhr.onreadystatechange = function () {
-        if(xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
-            console.log(xhr.responseText);
-        }
-    };
-xhr.send();
- -

Especificação

- - - - - - - - - - - - - - -
EspecificaçãoStatusComentário
{{SpecName('XMLHttpRequest', '#handler-xhr-onreadystatechange')}}{{Spec2('XMLHttpRequest')}}WHATWG living standard
- -

Compatibilidade com navegadores

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatChrome(1)}}{{CompatGeckoDesktop(1.0)}}{{CompatIe(7)}}[1]{{CompatVersionUnknown}}{{CompatSafari(1.2)}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}1.0{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

[1] Internet Explorer versão 5 e 6 suportam chamadas ajax usando ActiveXObject().

diff --git a/files/pt-br/web/api/xmlhttprequest/readystatechange_event/index.html b/files/pt-br/web/api/xmlhttprequest/readystatechange_event/index.html new file mode 100644 index 0000000000..da80c1fb7b --- /dev/null +++ b/files/pt-br/web/api/xmlhttprequest/readystatechange_event/index.html @@ -0,0 +1,121 @@ +--- +title: XMLHttpRequest.onreadystatechange +slug: Web/API/XMLHttpRequest/readystatechange_event +tags: + - AJAX + - API + - Evento + - Manipulador de eventos + - XHR + - XMLHttpRequest +translation_of: Web/API/XMLHttpRequest/onreadystatechange +original_slug: Web/API/XMLHttpRequest/onreadystatechange +--- +
{{APIRef}}
+ +

Um EventHandler é chamado sempre que o atributo readyState é modificado. O callback é chamado a partir da interface do usuário. A propriedade XMLHttpRequest.onreadystatechange contém o manipulador de eventos que é chamado quando o evento readystatechange é disparado, ou seja, toda vez que a propriedade {{domxref("XMLHttpRequest.readyState", "readyState")}} do {{domxref("XMLHttpRequest")}} é modificada.

+ +
+

Atenção: Isso não deve ser usado com solicitações síncronas e não deve ser usado como código nativo.

+
+ +

O evento readystatechange não será chamado quando a XMLHttpRequest request for cancelada pelo método abort().

+ +
+

Atualização: Está disparando na última versão de navegadores (Firefox 51.0.1, Opera 43.0.2442.991, Safari 10.0.3 (12602.4.8), Chrome 54.0.2840.71, Edge, IE11). Exemplo aqui - basta recarregar a página algumas vezes.

+
+ +

Sitaxe

+ +
XMLHttpRequest.onreadystatechange = callback;
+ +

Valores

+ + + +

Exemplo

+ +
var xhr = new XMLHttpRequest(),
+    method = "GET",
+    url = "https://developer.mozilla.org/";
+
+xhr.open(method, url, true);
+xhr.onreadystatechange = function () {
+        if(xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
+            console.log(xhr.responseText);
+        }
+    };
+xhr.send();
+ +

Especificação

+ + + + + + + + + + + + + + +
EspecificaçãoStatusComentário
{{SpecName('XMLHttpRequest', '#handler-xhr-onreadystatechange')}}{{Spec2('XMLHttpRequest')}}WHATWG living standard
+ +

Compatibilidade com navegadores

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatChrome(1)}}{{CompatGeckoDesktop(1.0)}}{{CompatIe(7)}}[1]{{CompatVersionUnknown}}{{CompatSafari(1.2)}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}1.0{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

[1] Internet Explorer versão 5 e 6 suportam chamadas ajax usando ActiveXObject().

-- cgit v1.2.3-54-g00ecf