Skip to content

Commit e0a271f

Browse files
Gate available() and install() behind a policy (#164)
* Gate available() and install() behind a policy * Gate available() and install() behind a policy --------- Co-authored-by: Evan Liu <[email protected]>
1 parent 0f9acb0 commit e0a271f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

index.bs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ See <a href="https://lists.w3.org/Archives/Public/public-speech-api/2012Sep/0072
383383
<dt><dfn method for=SpeechRecognition>available({{SpeechRecognitionOptions}} options)</dfn> method</dt>
384384
<dd>
385385
The {{SpeechRecognition/available}} method returns a {{Promise}} that resolves to a {{AvailabilityStatus}} indicating the recognition availability matching the {{SpeechRecognitionOptions}} argument.
386+
Access to this method is gated behind the [=policy-controlled feature=] "on-device-speech-recognition", which has a [=policy-controlled feature/default allowlist=] of <code>[=default allowlist/'self'=]</code>.
386387

387388
When invoked, run these steps:
388389
1. Let <var>promise</var> be <a>a new promise</a>.
@@ -396,6 +397,7 @@ See <a href="https://lists.w3.org/Archives/Public/public-speech-api/2012Sep/0072
396397
It returns a {{Promise}} that resolves to a {{boolean}}.
397398
The promise resolves to `true` when all installation attempts for requested and supported languages succeed (or the languages were already installed).
398399
The promise resolves to `false` if `options.langs` is empty, if not all of the requested languages are supported, or if any installation attempt for a supported language fails.
400+
Access to this method is gated behind the [=policy-controlled feature=] "on-device-speech-recognition", which has a [=policy-controlled feature/default allowlist=] of <code>[=default allowlist/'self'=]</code>.
399401

400402
When invoked, run these steps:
401403
1. If the [=current settings object=]'s [=relevant global object=]'s [=associated Document=] is NOT [=fully active=], throw an {{InvalidStateError}} and abort these steps.

0 commit comments

Comments
 (0)