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/de/_redirects.txt | 1 + files/de/_wikihistory.json | 2 +- files/de/web/api/filereader/load_event/index.html | 25 +++++++++++++++ files/de/web/api/filereader/onload/index.html | 24 --------------- files/es/_redirects.txt | 1 + files/es/_wikihistory.json | 2 +- files/es/web/api/filereader/load_event/index.html | 30 ++++++++++++++++++ files/es/web/api/filereader/onload/index.html | 29 ----------------- files/ja/_redirects.txt | 3 ++ files/ja/_wikihistory.json | 36 +++++++++++----------- .../web/api/filereader/abort_event/index.html | 17 ++++++++++ .../web/api/filereader/error_event/index.html | 19 ++++++++++++ .../web/api/filereader/load_event/index.html | 30 ++++++++++++++++++ files/ja/web/api/filereader/onabort/index.html | 16 ---------- files/ja/web/api/filereader/onerror/index.html | 18 ----------- files/ja/web/api/filereader/onload/index.html | 29 ----------------- 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 ----------------- files/ru/_redirects.txt | 1 + files/ru/_wikihistory.json | 14 ++++----- files/ru/web/api/filereader/abort_event/index.html | 11 +++++++ files/ru/web/api/filereader/onabort/index.html | 10 ------ files/zh-cn/_redirects.txt | 2 ++ files/zh-cn/_wikihistory.json | 24 +++++++-------- .../web/api/filereader/abort_event/index.html | 13 ++++++++ .../web/api/filereader/load_event/index.html | 26 ++++++++++++++++ files/zh-cn/web/api/filereader/onabort/index.html | 12 -------- files/zh-cn/web/api/filereader/onload/index.html | 25 --------------- 30 files changed, 250 insertions(+), 232 deletions(-) create mode 100644 files/de/web/api/filereader/load_event/index.html delete mode 100644 files/de/web/api/filereader/onload/index.html create mode 100644 files/es/web/api/filereader/load_event/index.html delete mode 100644 files/es/web/api/filereader/onload/index.html create mode 100644 files/ja/conflicting/web/api/filereader/abort_event/index.html create mode 100644 files/ja/conflicting/web/api/filereader/error_event/index.html create mode 100644 files/ja/conflicting/web/api/filereader/load_event/index.html delete mode 100644 files/ja/web/api/filereader/onabort/index.html delete mode 100644 files/ja/web/api/filereader/onerror/index.html delete mode 100644 files/ja/web/api/filereader/onload/index.html 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 create mode 100644 files/ru/web/api/filereader/abort_event/index.html delete mode 100644 files/ru/web/api/filereader/onabort/index.html create mode 100644 files/zh-cn/conflicting/web/api/filereader/abort_event/index.html create mode 100644 files/zh-cn/conflicting/web/api/filereader/load_event/index.html delete mode 100644 files/zh-cn/web/api/filereader/onabort/index.html delete mode 100644 files/zh-cn/web/api/filereader/onload/index.html diff --git a/files/de/_redirects.txt b/files/de/_redirects.txt index c214e762da..f6ee4d81d4 100644 --- a/files/de/_redirects.txt +++ b/files/de/_redirects.txt @@ -424,6 +424,7 @@ /de/docs/Web/API/File/Zugriff_auf_Dateien_von_Webapplikationen /de/docs/Web/API/File/Using_files_from_web_applications /de/docs/Web/API/File/fileName /de/docs/conflicting/Web/API/File/name /de/docs/Web/API/File/fileSize /de/docs/Web/API/Blob/size +/de/docs/Web/API/FileReader/onload /de/docs/Web/API/FileReader/load_event /de/docs/Web/API/FullscreenOptions /de/docs/orphaned/Web/API/FullscreenOptions /de/docs/Web/API/IndexedDB_API/IndexedDB_verwenden /de/docs/Web/API/IndexedDB_API/Using_IndexedDB /de/docs/Web/API/Navigator/registerProtocolHandler/Webbasierte_protokoll-handler /de/docs/Web/API/Navigator/registerProtocolHandler/Web-based_protocol_handlers diff --git a/files/de/_wikihistory.json b/files/de/_wikihistory.json index 368a5e8b43..544d6f1274 100644 --- a/files/de/_wikihistory.json +++ b/files/de/_wikihistory.json @@ -3038,7 +3038,7 @@ "MatthiasRubin" ] }, - "Web/API/FileReader/onload": { + "Web/API/FileReader/load_event": { "modified": "2019-03-23T22:41:15.437Z", "contributors": [ "rehne93", diff --git a/files/de/web/api/filereader/load_event/index.html b/files/de/web/api/filereader/load_event/index.html new file mode 100644 index 0000000000..e5fa188074 --- /dev/null +++ b/files/de/web/api/filereader/load_event/index.html @@ -0,0 +1,25 @@ +--- +title: onload +slug: Web/API/FileReader/load_event +tags: + - Dateien + - Lesen +translation_of: Web/API/FileReader/onload +original_slug: Web/API/FileReader/onload +--- +

Das onload Event wird ausgelöst, wenn der Inhalt von readAsArrayBuffer, readAsBinaryString, readAsDataURL or readAsText verfügbar ist.

+ +

Beispiel

+ +
// Callback von einem <input type="file" onchange="onChange(event)">
+function onChange(event) {
+  var file = event.target.files[0];
+  var reader = new FileReader();
+  reader.onload = function(event) {
+    // Hier wird der Text der Datei ausgegeben
+    console.log(event.target.result)
+  };
+
+  reader.readAsText(file);
+}
+
diff --git a/files/de/web/api/filereader/onload/index.html b/files/de/web/api/filereader/onload/index.html deleted file mode 100644 index 95dda3e59f..0000000000 --- a/files/de/web/api/filereader/onload/index.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: onload -slug: Web/API/FileReader/onload -tags: - - Dateien - - Lesen -translation_of: Web/API/FileReader/onload ---- -

Das onload Event wird ausgelöst, wenn der Inhalt von readAsArrayBuffer, readAsBinaryString, readAsDataURL or readAsText verfügbar ist.

- -

Beispiel

- -
// Callback von einem <input type="file" onchange="onChange(event)">
-function onChange(event) {
-  var file = event.target.files[0];
-  var reader = new FileReader();
-  reader.onload = function(event) {
-    // Hier wird der Text der Datei ausgegeben
-    console.log(event.target.result)
-  };
-
-  reader.readAsText(file);
-}
-
diff --git a/files/es/_redirects.txt b/files/es/_redirects.txt index 887c7b77d1..0216d3ebb5 100644 --- a/files/es/_redirects.txt +++ b/files/es/_redirects.txt @@ -1545,6 +1545,7 @@ /es/docs/Web/API/Fetch_API/Conceptos_basicos /es/docs/Web/API/Fetch_API/Basic_concepts /es/docs/Web/API/Fetch_API/Utilizando_Fetch /es/docs/Web/API/Fetch_API/Using_Fetch /es/docs/Web/API/File/fileName /es/docs/conflicting/Web/API/File/name +/es/docs/Web/API/FileReader/onload /es/docs/Web/API/FileReader/load_event /es/docs/Web/API/Geolocalización /es/docs/Web/API/Geolocation /es/docs/Web/API/Geolocation.clearWatch /es/docs/Web/API/Geolocation/clearWatch /es/docs/Web/API/Geolocation.getCurrentPosition /es/docs/Web/API/Geolocation/getCurrentPosition diff --git a/files/es/_wikihistory.json b/files/es/_wikihistory.json index e6e246afaa..6466283b7a 100644 --- a/files/es/_wikihistory.json +++ b/files/es/_wikihistory.json @@ -6627,7 +6627,7 @@ "cm_rocanroll" ] }, - "Web/API/FileReader/onload": { + "Web/API/FileReader/load_event": { "modified": "2019-03-23T22:18:25.451Z", "contributors": [ "DaniMartiRamirez" diff --git a/files/es/web/api/filereader/load_event/index.html b/files/es/web/api/filereader/load_event/index.html new file mode 100644 index 0000000000..6722678b4c --- /dev/null +++ b/files/es/web/api/filereader/load_event/index.html @@ -0,0 +1,30 @@ +--- +title: FileReader.onload +slug: Web/API/FileReader/load_event +tags: + - Archivo + - Controlador de Eventos + - Lector de Archivos + - Propiedad + - Referencia +translation_of: Web/API/FileReader/onload +original_slug: Web/API/FileReader/onload +--- +

{{APIRef}}

+ +

La propiedad FileReader.onload contiene un controlador de evento ejecutado cuando {{event('load')}}  es ejecutado, cuando el  contenido es leído con readAsArrayBuffer, readAsBinaryString, readAsDataURLreadAsText está habilitado.

+ +

Ejemplo

+ +
// Respuest desde un <input type="file" onchange="onChange(event)">
+function onChange(event) {
+  var file = event.target.files[0];
+  var reader = new FileReader();
+  reader.onload = function(event) {
+    // El texto del archivo se mostrará por consola aquí
+    console.log(event.target.result)
+  };
+
+  reader.readAsText(file);
+}
+
diff --git a/files/es/web/api/filereader/onload/index.html b/files/es/web/api/filereader/onload/index.html deleted file mode 100644 index d3172638fd..0000000000 --- a/files/es/web/api/filereader/onload/index.html +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: FileReader.onload -slug: Web/API/FileReader/onload -tags: - - Archivo - - Controlador de Eventos - - Lector de Archivos - - Propiedad - - Referencia -translation_of: Web/API/FileReader/onload ---- -

{{APIRef}}

- -

La propiedad FileReader.onload contiene un controlador de evento ejecutado cuando {{event('load')}}  es ejecutado, cuando el  contenido es leído con readAsArrayBuffer, readAsBinaryString, readAsDataURLreadAsText está habilitado.

- -

Ejemplo

- -
// Respuest desde un <input type="file" onchange="onChange(event)">
-function onChange(event) {
-  var file = event.target.files[0];
-  var reader = new FileReader();
-  reader.onload = function(event) {
-    // El texto del archivo se mostrará por consola aquí
-    console.log(event.target.result)
-  };
-
-  reader.readAsText(file);
-}
-
diff --git a/files/ja/_redirects.txt b/files/ja/_redirects.txt index 2165207bd5..98461ee39d 100644 --- a/files/ja/_redirects.txt +++ b/files/ja/_redirects.txt @@ -3110,6 +3110,9 @@ /ja/docs/Web/API/File/fileName /ja/docs/conflicting/Web/API/File/name /ja/docs/Web/API/File/fileSize /ja/docs/conflicting/Web/API/Blob/size /ja/docs/Web/API/File/size /ja/docs/Web/API/Blob/size +/ja/docs/Web/API/FileReader/onabort /ja/docs/conflicting/Web/API/FileReader/abort_event +/ja/docs/Web/API/FileReader/onerror /ja/docs/conflicting/Web/API/FileReader/error_event +/ja/docs/Web/API/FileReader/onload /ja/docs/conflicting/Web/API/FileReader/load_event /ja/docs/Web/API/Geolocation.clearWatch /ja/docs/Web/API/Geolocation/clearWatch /ja/docs/Web/API/Geolocation.getCurrentPosition /ja/docs/Web/API/Geolocation/getCurrentPosition /ja/docs/Web/API/Geolocation.watchPosition /ja/docs/Web/API/Geolocation/watchPosition diff --git a/files/ja/_wikihistory.json b/files/ja/_wikihistory.json index 664e7a3bfe..eab8b35361 100644 --- a/files/ja/_wikihistory.json +++ b/files/ja/_wikihistory.json @@ -14862,24 +14862,6 @@ "mfuji09" ] }, - "Web/API/FileReader/onabort": { - "modified": "2020-09-25T19:31:51.509Z", - "contributors": [ - "silverskyvicto" - ] - }, - "Web/API/FileReader/onerror": { - "modified": "2020-09-25T19:37:21.563Z", - "contributors": [ - "silverskyvicto" - ] - }, - "Web/API/FileReader/onload": { - "modified": "2019-03-23T22:37:58.368Z", - "contributors": [ - "YuichiNukiyama" - ] - }, "Web/API/FileReader/progress_event": { "modified": "2020-10-15T22:16:11.772Z", "contributors": [ @@ -48412,6 +48394,24 @@ "ethertank" ] }, + "conflicting/Web/API/FileReader/abort_event": { + "modified": "2020-09-25T19:31:51.509Z", + "contributors": [ + "silverskyvicto" + ] + }, + "conflicting/Web/API/FileReader/error_event": { + "modified": "2020-09-25T19:37:21.563Z", + "contributors": [ + "silverskyvicto" + ] + }, + "conflicting/Web/API/FileReader/load_event": { + "modified": "2019-03-23T22:37:58.368Z", + "contributors": [ + "YuichiNukiyama" + ] + }, "conflicting/Web/API/Geolocation/getCurrentPosition": { "modified": "2019-03-23T22:19:48.329Z", "contributors": [ diff --git a/files/ja/conflicting/web/api/filereader/abort_event/index.html b/files/ja/conflicting/web/api/filereader/abort_event/index.html new file mode 100644 index 0000000000..9aef093dc4 --- /dev/null +++ b/files/ja/conflicting/web/api/filereader/abort_event/index.html @@ -0,0 +1,17 @@ +--- +title: FileReader.onabort +slug: conflicting/Web/API/FileReader/abort_event +tags: + - Event Handler + - File + - FileReader + - Property + - Reference +translation_of: Web/API/FileReader/onabort +original_slug: Web/API/FileReader/onabort +--- +

FileReader.onabort プロパティには、abort イベントが発生したとき、つまりファイルの読み取り処理が中止されたときに実行されるイベント ハンドラが含まれています。

+ +

シンタックス

+ +
reader.onabort = function() { ... };
diff --git a/files/ja/conflicting/web/api/filereader/error_event/index.html b/files/ja/conflicting/web/api/filereader/error_event/index.html new file mode 100644 index 0000000000..d794e3df63 --- /dev/null +++ b/files/ja/conflicting/web/api/filereader/error_event/index.html @@ -0,0 +1,19 @@ +--- +title: onerror +slug: conflicting/Web/API/FileReader/error_event +translation_of: Web/API/FileReader/onerror +original_slug: Web/API/FileReader/onerror +--- +

FileReader の onerror ハンドラは、Error オブジェクトではなく Event オブジェクトをパラメータとして受け取りますが、エラーは FileReader オブジェクトから instanceOfFileReader.error のようにアクセスすることができます。

+ +
// <input type="file" onchange="onChange(event)"> からのコールバック
+function onChange(event) {
+  var file = event.target.files[0];
+  var reader = new FileReader();
+  reader.onerror = function(event) {
+    alert("ファイルの読み込みに失敗しました。\n\n" + reader.error);
+    reader.abort(); // (...これは onerror ハンドラで何か有用なことをするのでしょうか?)
+  };
+
+  reader.readAsText(file);
+}
diff --git a/files/ja/conflicting/web/api/filereader/load_event/index.html b/files/ja/conflicting/web/api/filereader/load_event/index.html new file mode 100644 index 0000000000..0dd765290c --- /dev/null +++ b/files/ja/conflicting/web/api/filereader/load_event/index.html @@ -0,0 +1,30 @@ +--- +title: FileReader.onload +slug: conflicting/Web/API/FileReader/load_event +tags: + - Event Handler + - File + - FileReader + - Property + - Reference +translation_of: Web/API/FileReader/onload +original_slug: Web/API/FileReader/onload +--- +

{{APIRef}}

+ +

FileReader.onload プロパティは、readAsArrayBufferreadAsBinaryStringreadAsDataURLreadAsText でのコンテンツ読み込みが完了して、利用可能になると発火する {{event('load')}} イベント時に実行されるイベントハンドラを含みます。

+ +

+ +
// <input type="file" onchange="onChange(event)"> からのコールバック
+function onChange(event) {
+  var file = event.target.files[0];
+  var reader = new FileReader();
+  reader.onload = function(event) {
+    // ファイルのテキストがここにプリントされる
+    console.log(event.target.result)
+  };
+
+  reader.readAsText(file);
+}
+
diff --git a/files/ja/web/api/filereader/onabort/index.html b/files/ja/web/api/filereader/onabort/index.html deleted file mode 100644 index 594a867ef5..0000000000 --- a/files/ja/web/api/filereader/onabort/index.html +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: FileReader.onabort -slug: Web/API/FileReader/onabort -tags: - - Event Handler - - File - - FileReader - - Property - - Reference -translation_of: Web/API/FileReader/onabort ---- -

FileReader.onabort プロパティには、abort イベントが発生したとき、つまりファイルの読み取り処理が中止されたときに実行されるイベント ハンドラが含まれています。

- -

シンタックス

- -
reader.onabort = function() { ... };
diff --git a/files/ja/web/api/filereader/onerror/index.html b/files/ja/web/api/filereader/onerror/index.html deleted file mode 100644 index 77ee74e4c9..0000000000 --- a/files/ja/web/api/filereader/onerror/index.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: onerror -slug: Web/API/FileReader/onerror -translation_of: Web/API/FileReader/onerror ---- -

FileReader の onerror ハンドラは、Error オブジェクトではなく Event オブジェクトをパラメータとして受け取りますが、エラーは FileReader オブジェクトから instanceOfFileReader.error のようにアクセスすることができます。

- -
// <input type="file" onchange="onChange(event)"> からのコールバック
-function onChange(event) {
-  var file = event.target.files[0];
-  var reader = new FileReader();
-  reader.onerror = function(event) {
-    alert("ファイルの読み込みに失敗しました。\n\n" + reader.error);
-    reader.abort(); // (...これは onerror ハンドラで何か有用なことをするのでしょうか?)
-  };
-
-  reader.readAsText(file);
-}
diff --git a/files/ja/web/api/filereader/onload/index.html b/files/ja/web/api/filereader/onload/index.html deleted file mode 100644 index cee0e907f9..0000000000 --- a/files/ja/web/api/filereader/onload/index.html +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: FileReader.onload -slug: Web/API/FileReader/onload -tags: - - Event Handler - - File - - FileReader - - Property - - Reference -translation_of: Web/API/FileReader/onload ---- -

{{APIRef}}

- -

FileReader.onload プロパティは、readAsArrayBufferreadAsBinaryStringreadAsDataURLreadAsText でのコンテンツ読み込みが完了して、利用可能になると発火する {{event('load')}} イベント時に実行されるイベントハンドラを含みます。

- -

- -
// <input type="file" onchange="onChange(event)"> からのコールバック
-function onChange(event) {
-  var file = event.target.files[0];
-  var reader = new FileReader();
-  reader.onload = function(event) {
-    // ファイルのテキストがここにプリントされる
-    console.log(event.target.result)
-  };
-
-  reader.readAsText(file);
-}
-
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);
-}
-
diff --git a/files/ru/_redirects.txt b/files/ru/_redirects.txt index 2f010dde80..aa50f26b06 100644 --- a/files/ru/_redirects.txt +++ b/files/ru/_redirects.txt @@ -329,6 +329,7 @@ /ru/docs/Web/API/Element/accessKey /ru/docs/Web/API/HTMLElement/accessKey /ru/docs/Web/API/EventTarget.addEventListener /ru/docs/Web/API/EventTarget/addEventListener /ru/docs/Web/API/File/fileName /ru/docs/conflicting/Web/API/File/name +/ru/docs/Web/API/FileReader/onabort /ru/docs/Web/API/FileReader/abort_event /ru/docs/Web/API/File_and_Directory_Entries_API/Введение /ru/docs/Web/API/File_and_Directory_Entries_API/Introduction /ru/docs/Web/API/Geolocation/Using_geolocation /ru/docs/Web/API/Geolocation_API /ru/docs/Web/API/Geolocation/Using_geolocation/Using_the_Geolocation_API /ru/docs/Web/API/Geolocation_API/Using_the_Geolocation_API diff --git a/files/ru/_wikihistory.json b/files/ru/_wikihistory.json index a46230ec2c..4a8d00b762 100644 --- a/files/ru/_wikihistory.json +++ b/files/ru/_wikihistory.json @@ -7987,19 +7987,19 @@ "Excent163" ] }, - "Web/API/FileReader/error": { - "modified": "2020-10-15T22:09:49.214Z", - "contributors": [ - "A-Mikhail" - ] - }, - "Web/API/FileReader/onabort": { + "Web/API/FileReader/abort_event": { "modified": "2020-05-07T08:21:21.125Z", "contributors": [ "Excent163", "SpaceMotion" ] }, + "Web/API/FileReader/error": { + "modified": "2020-10-15T22:09:49.214Z", + "contributors": [ + "A-Mikhail" + ] + }, "Web/API/FileReader/readAsArrayBuffer": { "modified": "2019-03-23T22:44:45.661Z", "contributors": [ diff --git a/files/ru/web/api/filereader/abort_event/index.html b/files/ru/web/api/filereader/abort_event/index.html new file mode 100644 index 0000000000..5db067d02c --- /dev/null +++ b/files/ru/web/api/filereader/abort_event/index.html @@ -0,0 +1,11 @@ +--- +title: FileReader.onabort +slug: Web/API/FileReader/abort_event +translation_of: Web/API/FileReader/onabort +original_slug: Web/API/FileReader/onabort +--- +

Значением свойства FileReader.onabort является функция которая вызывается в случае если срабатывает событие abort, например когда процесс чтения файла прерывается по каким-либо причинам.  

+ +

Синтаксис

+ +
reader.onabort = function() { ... };
diff --git a/files/ru/web/api/filereader/onabort/index.html b/files/ru/web/api/filereader/onabort/index.html deleted file mode 100644 index cf9d62c646..0000000000 --- a/files/ru/web/api/filereader/onabort/index.html +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: FileReader.onabort -slug: Web/API/FileReader/onabort -translation_of: Web/API/FileReader/onabort ---- -

Значением свойства FileReader.onabort является функция которая вызывается в случае если срабатывает событие abort, например когда процесс чтения файла прерывается по каким-либо причинам.  

- -

Синтаксис

- -
reader.onabort = function() { ... };
diff --git a/files/zh-cn/_redirects.txt b/files/zh-cn/_redirects.txt index e4ba07b3fc..6789bcbf8c 100644 --- a/files/zh-cn/_redirects.txt +++ b/files/zh-cn/_redirects.txt @@ -1343,6 +1343,8 @@ /zh-CN/docs/Web/API/File/fileName /zh-CN/docs/conflicting/Web/API/File/name /zh-CN/docs/Web/API/File/fileSize /zh-CN/docs/conflicting/Web/API/Blob/size /zh-CN/docs/Web/API/File/size /zh-CN/docs/conflicting/Web/API/Blob/size_3e7c15d3e7851172bb4623d0237d8c9e +/zh-CN/docs/Web/API/FileReader/onabort /zh-CN/docs/conflicting/Web/API/FileReader/abort_event +/zh-CN/docs/Web/API/FileReader/onload /zh-CN/docs/conflicting/Web/API/FileReader/load_event /zh-CN/docs/Web/API/FileReader/中止事件(abort) /zh-CN/docs/Web/API/FileReader/abort_event /zh-CN/docs/Web/API/FormData/删除 /zh-CN/docs/Web/API/FormData/delete /zh-CN/docs/Web/API/Fullscreen_API/指南 /zh-CN/docs/Web/API/Fullscreen_API/Guide diff --git a/files/zh-cn/_wikihistory.json b/files/zh-cn/_wikihistory.json index db475bbc4d..04de070975 100644 --- a/files/zh-cn/_wikihistory.json +++ b/files/zh-cn/_wikihistory.json @@ -13442,18 +13442,6 @@ "qhy90223" ] }, - "Web/API/FileReader/onabort": { - "modified": "2019-04-18T04:11:44.611Z", - "contributors": [ - "allan2coder" - ] - }, - "Web/API/FileReader/onload": { - "modified": "2019-03-23T22:21:51.910Z", - "contributors": [ - "Cattla" - ] - }, "Web/API/FileReader/readAsArrayBuffer": { "modified": "2019-07-09T04:48:45.088Z", "contributors": [ @@ -46972,6 +46960,18 @@ "ziyunfei" ] }, + "conflicting/Web/API/FileReader/abort_event": { + "modified": "2019-04-18T04:11:44.611Z", + "contributors": [ + "allan2coder" + ] + }, + "conflicting/Web/API/FileReader/load_event": { + "modified": "2019-03-23T22:21:51.910Z", + "contributors": [ + "Cattla" + ] + }, "conflicting/Web/API/File_and_Directory_Entries_API/Introduction": { "modified": "2019-03-23T23:17:06.579Z", "contributors": [ diff --git a/files/zh-cn/conflicting/web/api/filereader/abort_event/index.html b/files/zh-cn/conflicting/web/api/filereader/abort_event/index.html new file mode 100644 index 0000000000..c899854b36 --- /dev/null +++ b/files/zh-cn/conflicting/web/api/filereader/abort_event/index.html @@ -0,0 +1,13 @@ +--- +title: FileReader.onabort +slug: conflicting/Web/API/FileReader/abort_event +translation_of: Web/API/FileReader/onabort +original_slug: Web/API/FileReader/onabort +--- +

FileReader.onabort 属性包含在终止事件被触发时执行的事件处理程序,举例,当读取文件的过程中需要中止时。

+ +

语法

+ +
reader.onabort = function() { ... };
+ +

 

diff --git a/files/zh-cn/conflicting/web/api/filereader/load_event/index.html b/files/zh-cn/conflicting/web/api/filereader/load_event/index.html new file mode 100644 index 0000000000..3d48f35fb0 --- /dev/null +++ b/files/zh-cn/conflicting/web/api/filereader/load_event/index.html @@ -0,0 +1,26 @@ +--- +title: FileReader.onload +slug: conflicting/Web/API/FileReader/load_event +tags: + - 文件 +translation_of: Web/API/FileReader/onload +original_slug: Web/API/FileReader/onload +--- +

{{APIRef}}

+ +

FileReader 读取文件的方式为  readAsArrayBuffer, readAsBinaryString, readAsDataURL 或者 readAsText 的时候,会触发一个 {{event('load')}} 事件。从而可以使用  FileReader.onload 属性对该事件进行处理。

+ +

范例

+ +
// 一个文件上传的回调 <input type="file" onchange="onChange(event)">
+function onChange(event) {
+  var file = event.target.files[0];
+  var reader = new FileReader();
+  reader.onload = function(event) {
+    // 文件里的文本会在这里被打印出来
+    console.log(event.target.result)
+  };
+
+  reader.readAsText(file);
+}
+
diff --git a/files/zh-cn/web/api/filereader/onabort/index.html b/files/zh-cn/web/api/filereader/onabort/index.html deleted file mode 100644 index d992162230..0000000000 --- a/files/zh-cn/web/api/filereader/onabort/index.html +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: FileReader.onabort -slug: Web/API/FileReader/onabort -translation_of: Web/API/FileReader/onabort ---- -

FileReader.onabort 属性包含在终止事件被触发时执行的事件处理程序,举例,当读取文件的过程中需要中止时。

- -

语法

- -
reader.onabort = function() { ... };
- -

 

diff --git a/files/zh-cn/web/api/filereader/onload/index.html b/files/zh-cn/web/api/filereader/onload/index.html deleted file mode 100644 index 971ffa3d37..0000000000 --- a/files/zh-cn/web/api/filereader/onload/index.html +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: FileReader.onload -slug: Web/API/FileReader/onload -tags: - - 文件 -translation_of: Web/API/FileReader/onload ---- -

{{APIRef}}

- -

FileReader 读取文件的方式为  readAsArrayBuffer, readAsBinaryString, readAsDataURL 或者 readAsText 的时候,会触发一个 {{event('load')}} 事件。从而可以使用  FileReader.onload 属性对该事件进行处理。

- -

范例

- -
// 一个文件上传的回调 <input type="file" onchange="onChange(event)">
-function onChange(event) {
-  var file = event.target.files[0];
-  var reader = new FileReader();
-  reader.onload = function(event) {
-    // 文件里的文本会在这里被打印出来
-    console.log(event.target.result)
-  };
-
-  reader.readAsText(file);
-}
-
-- cgit v1.2.3-54-g00ecf