From 14d1c79a9614c8a7e399cd5f01d179b3553ce21a Mon Sep 17 00:00:00 2001 From: Dominique Hazael-Massieux Date: Wed, 28 May 2025 10:55:15 +0200 Subject: [PATCH] Use DOM-phrasing to clarify the interface of error event see https://dom.spec.whatwg.org/#firing-events-example --- index.bs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index d13ebcc..c7684a4 100644 --- a/index.bs +++ b/index.bs @@ -481,9 +481,9 @@ following steps: for=SpeechRecognition>error event or end event has fired on it, throw an {{InvalidStateError}} and abort these steps. 1. If this.{{SpeechRecognition/[[processLocally]]}} is `true`: - 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: - i. [=Queue a task=] to [=fire an event=] named `error` at `this`. The event's `error` attribute MUST be {{SpeechRecognitionErrorCode/service-not-allowed}}. The event's `message` attribute MUST provide an implementation-defined string detailing the reason. - ii. Abort these steps. + 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: + 1. [=Queue a task=] to [=fire an event=] named error 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. + 1. Abort these steps. 1. Set {{[[started]]}} to `true`. 1. If |requestMicrophonePermission| is `true` and [=request permission to use=] "`microphone`" is [=permission/"denied"=], abort