aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/api/eventsource/error_event/index.html
diff options
context:
space:
mode:
authorAtsuto Yamashita <atyamash@yahoo-corp.jp>2022-03-15 19:47:35 +0900
committerGitHub <noreply@github.com>2022-03-15 19:47:35 +0900
commit9bf38df91fadd199a5ea45ad79d5e111ddfb3fe0 (patch)
tree71952407ea41c86feabef4214610d59e15aae55d /files/pt-br/web/api/eventsource/error_event/index.html
parentc2678137db5f97ad1fe39e872529159a1afafec1 (diff)
parent9e7fbb013772ebab9b35185f0d0836995acbe6db (diff)
downloadtranslated-content-9bf38df91fadd199a5ea45ad79d5e111ddfb3fe0.tar.gz
translated-content-9bf38df91fadd199a5ea45ad79d5e111ddfb3fe0.tar.bz2
translated-content-9bf38df91fadd199a5ea45ad79d5e111ddfb3fe0.zip
Merge branch 'main' into fix-typo-client-side-web-apis-intro-ja
Diffstat (limited to 'files/pt-br/web/api/eventsource/error_event/index.html')
-rw-r--r--files/pt-br/web/api/eventsource/error_event/index.html122
1 files changed, 122 insertions, 0 deletions
diff --git a/files/pt-br/web/api/eventsource/error_event/index.html b/files/pt-br/web/api/eventsource/error_event/index.html
new file mode 100644
index 0000000000..9f0407f3f4
--- /dev/null
+++ b/files/pt-br/web/api/eventsource/error_event/index.html
@@ -0,0 +1,122 @@
+---
+title: EventSource.onerror
+slug: Web/API/EventSource/error_event
+translation_of: Web/API/EventSource/onerror
+original_slug: Web/API/EventSource/onerror
+---
+<div>{{APIRef('WebSockets API')}}</div>
+
+<div> </div>
+
+<p>A propriedade <code><strong>onerror</strong></code> da interface {{domxref("EventSource")}} é um {{event("Event_handlers", "event handler")}} chamado quando um erro ocorre e um evento {{event("error")}} é despachado para o objeto <code>EventSource</code>.</p>
+
+<h2 id="Sintaxe">Sintaxe</h2>
+
+<pre class="syntaxbox">eventSource.onerror = function</pre>
+
+<h2 id="Exemplos">Exemplos</h2>
+
+<pre class="brush: js">evtSource.onerror = function() {
+ console.log("EventSource failed.");
+};</pre>
+
+<div class="note">
+<p><strong>Nota</strong>: Você pode encontrar um exemplo completo no GitHub — veja <a href="https://github.com/mdn/dom-examples/tree/master/server-sent-events">Simple SSE demo using PHP.</a></p>
+</div>
+
+<h2 id="Especificações">Especificações</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especificação</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comentário</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', "comms.html#handler-eventsource-onerror", "onerror")}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td>Definição inicial</td>
+ </tr>
+ </tbody>
+</table>
+
+<ul>
+</ul>
+
+<h2 id="Browser_compatibility">Compatibilidade com navegadores</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<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>Suporte a EventSource</td>
+ <td>6</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatGeckoDesktop("6.0")}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>5</td>
+ </tr>
+ <tr>
+ <td>Disponibilidade em workers compartilhados e dedicados<sup>[1]</sup></td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatGeckoDesktop("53.0")}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</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>Suporte a EventSource</td>
+ <td>4.4</td>
+ <td>45</td>
+ <td>{{CompatNo}}</td>
+ <td>12</td>
+ <td>4.1</td>
+ </tr>
+ <tr>
+ <td>Disponibilidade em workers compartilhados e dedicados<sup>[1]</sup></td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoMobile("53.0")}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<p>[1] Mas <a href="https://github.com/w3c/ServiceWorker/issues/947">ainda não em service workers.</a></p>
+
+<h2 id="Veja_também">Veja também</h2>
+
+<ul>
+ <li>{{domxref("EventSource")}}</li>
+</ul>