Skip to content

Commit 4ebb535

Browse files
authored
explainer: update language fallback
Updates language fallback to require a valid language tag.
1 parent 200131c commit 4ebb535

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

explainer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ Web developers may provide subtags (e.g. region and script). The implementation
555555
* If the provided language tag doesn't match any recognizer, remove the last subtag until there is a match. For example, `"zh-Hans-CN"` -> `"zh-Hans"` -> `"zh"`.
556556
* If the browser can't match any recognizer (after the above fallbacks), `createHandwritingRecognizer` rejects with an Error.
557557

558-
If language model constraints aren't provided, this implementation should try to pick a model based on `navigator.languages`. If this fails to match any recognizer, `createHandwritingRecognizer` rejects with an Error.
558+
If language model constraints aren't provided, the implementation should reject the promise with an error.
559559

560560
### Model Constraints vs. Model Identifier
561561
In the current design, we use model constraints and let the browser to determine the exact recognition models.

0 commit comments

Comments
 (0)