From 60e68bc9b4fc796aaea41a8c56ec02ad3b6ee618 Mon Sep 17 00:00:00 2001 From: MDN Date: Thu, 3 Mar 2022 00:14:36 +0000 Subject: [CRON] sync translated content --- files/pt-br/_redirects.txt | 1 + files/pt-br/_wikihistory.json | 2 +- .../pt-br/web/api/filereader/load_event/index.html | 30 ++++++++++++++++++++++ files/pt-br/web/api/filereader/onload/index.html | 29 --------------------- 4 files changed, 32 insertions(+), 30 deletions(-) create mode 100644 files/pt-br/web/api/filereader/load_event/index.html delete mode 100644 files/pt-br/web/api/filereader/onload/index.html (limited to 'files/pt-br') diff --git a/files/pt-br/_redirects.txt b/files/pt-br/_redirects.txt index 417b063a11..b1d7aa2343 100644 --- a/files/pt-br/_redirects.txt +++ b/files/pt-br/_redirects.txt @@ -514,6 +514,7 @@ /pt-BR/docs/Web/API/Element/addEventListener /pt-BR/docs/Web/API/EventTarget/addEventListener /pt-BR/docs/Web/API/Event/Comparativo_entre_Event_Targets /pt-BR/docs/Web/API/Event/Comparison_of_Event_Targets /pt-BR/docs/Web/API/Fetch_API/Uso_de_busca_Cross-global /pt-BR/docs/Web/API/Fetch_API/Cross-global_fetch_usage +/pt-BR/docs/Web/API/FileReader/onload /pt-BR/docs/Web/API/FileReader/load_event /pt-BR/docs/Web/API/FullscreenOptions /pt-BR/docs/orphaned/Web/API/FullscreenOptions /pt-BR/docs/Web/API/HTMLContentElement/Seletor /pt-BR/docs/Web/API/HTMLContentElement/select /pt-BR/docs/Web/API/History_API/Exemplo /pt-BR/docs/Web/API/History_API/Example diff --git a/files/pt-br/_wikihistory.json b/files/pt-br/_wikihistory.json index 361a809bd2..5b2ed45493 100644 --- a/files/pt-br/_wikihistory.json +++ b/files/pt-br/_wikihistory.json @@ -5148,7 +5148,7 @@ "helton-mori-dev" ] }, - "Web/API/FileReader/onload": { + "Web/API/FileReader/load_event": { "modified": "2019-12-24T01:07:36.177Z", "contributors": [ "euvanribeiro", diff --git a/files/pt-br/web/api/filereader/load_event/index.html b/files/pt-br/web/api/filereader/load_event/index.html new file mode 100644 index 0000000000..bb33f47c04 --- /dev/null +++ b/files/pt-br/web/api/filereader/load_event/index.html @@ -0,0 +1,30 @@ +--- +title: FileReader.onload +slug: Web/API/FileReader/load_event +tags: + - Arquivo + - Event Handler + - FileReader + - Manipulador de eventos + - Propriedade +translation_of: Web/API/FileReader/onload +original_slug: Web/API/FileReader/onload +--- +

{{APIRef}}

+ +

A propriedade FileReader.onload contém um manipulador de eventos (event handler) executado quando o evento de carregamento ({{event('load')}})  é ativado, quando o conteúdo lido com  readAsArrayBuffer, readAsBinaryString, readAsDataURL ou readAsText fica disponível.

+ +

Exemplo

+ +
// Callback de um <input type="file" onchange="onChange(event)">
+function onChange(event) {
+  var file = event.target.files[0];
+  var reader = new FileReader();
+  reader.onload = function(event) {
+    // O arquivo de texto será impresso aqui
+    console.log(event.target.result)
+  };
+
+  reader.readAsText(file);
+}
+
diff --git a/files/pt-br/web/api/filereader/onload/index.html b/files/pt-br/web/api/filereader/onload/index.html deleted file mode 100644 index 53b5774e88..0000000000 --- a/files/pt-br/web/api/filereader/onload/index.html +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: FileReader.onload -slug: Web/API/FileReader/onload -tags: - - Arquivo - - Event Handler - - FileReader - - Manipulador de eventos - - Propriedade -translation_of: Web/API/FileReader/onload ---- -

{{APIRef}}

- -

A propriedade FileReader.onload contém um manipulador de eventos (event handler) executado quando o evento de carregamento ({{event('load')}})  é ativado, quando o conteúdo lido com  readAsArrayBuffer, readAsBinaryString, readAsDataURL ou readAsText fica disponível.

- -

Exemplo

- -
// Callback de um <input type="file" onchange="onChange(event)">
-function onChange(event) {
-  var file = event.target.files[0];
-  var reader = new FileReader();
-  reader.onload = function(event) {
-    // O arquivo de texto será impresso aqui
-    console.log(event.target.result)
-  };
-
-  reader.readAsText(file);
-}
-
-- cgit v1.2.3-54-g00ecf