Add description of the `error' attribute in `SpeechRecognitionEvent'
authorHans Wennborg <hans@chromium.org>
Wed, 16 May 2012 15:08:24 +0100
changeset 5 dda65ab8f943
parent 4 59c52d03bdce
child 6 47cf911825a5
Add description of the `error' attribute in `SpeechRecognitionEvent'
speechapi.html
--- a/speechapi.html	Wed May 16 14:21:12 2012 +0100
+++ b/speechapi.html	Wed May 16 15:08:24 2012 +0100
@@ -596,7 +596,7 @@
     <span class="comment">// A full response, which could be interim or final, part of a continuous response or not</span>
     interface <dfn id="speechrecognitionevent">SpeechRecognitionEvent</dfn> : Event {
         readonly attribute <a href="#speechrecognitionresult">SpeechRecognitionResult</a> <a href="#dfn-result">result</a>;
-        readonly attribute <a href="#speechrecognitionerror">SpeechRecognitionError</a> error;
+        readonly attribute <a href="#speechrecognitionerror">SpeechRecognitionError</a> <a href="#dfn-error">error</a>;
         readonly attribute short <a href="#dfn-resultIndex">resultIndex</a>;
         readonly attribute <a href="#speechrecognitionresultlist">SpeechRecognitionResultList</a> <a href="#dfn-resulthistory">resultHistory</a>;
     };
@@ -854,13 +854,16 @@
 
     <h4 id="speechreco-event"><span class=secno>5.1.8 </span>Speech Recognition Event</h4>
 
-    <p>The Speech Recognition Event is the event that is raised each time there is an interim or final result.
+    <p>The Speech Recognition Event is the event that is raised each time there is an interim or final result, or when an error occurs.
     The event contains both the current most recent recognized bit (in the result object) as well as a history of the complete recognition session so far (in the results object).</p>
 
     <dl>
       <dt><dfn id="dfn-result">result</dfn></dt>
       <dd>The result element is the one single SpeechRecognitionResult that is new as of this request.</dd>
 
+      <dt><dfn id="dfn-error">error</dfn></dt>
+      <dd>For error events, this attribute is set to a SpeechRecognitionError object that describes the error.</dd>
+
       <dt><dfn id="dfn-resultIndex">resultIndex</dfn></dt>
       <dd>The resultIndex <em class="rfc2119" title="must">must</em> be set to the place in the results array that this particular new result goes.
       The resultIndex <em class="rfc2119" title="may">may</em> refer to a previous occupied array index from a previous SpeechRecognitionResultEvent.