Skip to content

Commit 0f9acb0

Browse files
Use DOM-phrasing to clarify the interface of error event (WebAudio#160)
see https://dom.spec.whatwg.org/#firing-events-example
1 parent e8a36c6 commit 0f9acb0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.bs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,9 @@ following steps:
481481
for=SpeechRecognition>error</a> event or <a event for=SpeechRecognition>end</a> event
482482
has fired on it, throw an {{InvalidStateError}} and abort these steps.
483483
1. If this.{{SpeechRecognition/[[processLocally]]}} is `true`:
484-
a. If the user agent determines that local speech recognition is not available for this.{{SpeechRecognition/lang}}, or if it cannot fulfill the local processing requirement for other reasons:
485-
i. [=Queue a task=] to [=fire an event=] named `error` at `this`. The event's `error` attribute <em class="rfc2119" title="MUST">MUST</em> be {{SpeechRecognitionErrorCode/service-not-allowed}}. The event's `message` attribute <em class="rfc2119" title="MUST">MUST</em> provide an implementation-defined string detailing the reason.
486-
ii. Abort these steps.
484+
1. If the user agent determines that local speech recognition is not available for this.{{SpeechRecognition/lang}}, or if it cannot fulfill the local processing requirement for other reasons:
485+
1. [=Queue a task=] to [=fire an event=] named <a event for=SpeechRecognition>error</a> at [=this=] using {{SpeechRecognitionErrorEvent}} with its {{SpeechRecognitionErrorEvent/error}} attribute initialized to {{SpeechRecognitionErrorCode/service-not-allowed}} and its {{SpeechRecognitionErrorEvent/message}} attribute set to an implementation-defined string detailing the reason.
486+
1. Abort these steps.
487487
1. Set {{[[started]]}} to `true`.
488488
1. If |requestMicrophonePermission| is `true` and [=request
489489
permission to use=] "`microphone`" is [=permission/"denied"=], abort

0 commit comments

Comments
 (0)