diff --git a/index.bs b/index.bs index 95ffbd4..90654de 100644 --- a/index.bs +++ b/index.bs @@ -111,7 +111,7 @@ partial interface AI { [Exposed=(Window,Worker), SecureContext] interface AISummarizerFactory { Promise create(optional AISummarizerCreateOptions options = {}); - Promise available(optional AISummarizerCreateCoreOptions options = {}); + Promise availability(optional AISummarizerCreateCoreOptions options = {}); }; [Exposed=(Window,Worker), SecureContext] @@ -393,7 +393,7 @@ The summarizer getter steps are to return [=this=]

Availability

- The available(|options|) method steps are: + The availability(|options|) method steps are: 1. If [=this=]'s [=relevant global object=] is a {{Window}} whose [=associated Document=] is not [=Document/fully active=], then return [=a promise rejected with=] an "{{InvalidStateError}}" {{DOMException}}. @@ -569,25 +569,25 @@ All of these [=struct/items=] are [=sets=] of strings representing [=Unicode can One way this could be implemented would be for [=summarizer language availabilities=] to return that "`zh-Hant`" is in the [=language availabilities/readily available input languages=], and "`zh`" and "`zh-Hans`" are in the [=language availabilities/after-download available input languages=]. This return value conforms to the requirements of the [=language tag set completeness rules=], in ensuring that "`zh`" is present. Per the "should"-level guidance, the implementation has determined that "`zh`" belongs in the set of [=language availabilities/after-download available input languages=], with "`zh-Hans`", instead of in the set of [=language availabilities/readily available input languages=], with "`zh-Hant`". - Combined with the use of [$LookupMatchingLocaleByBestFit$], this means {{AISummarizerFactory/available()}} will give the following answers: + Combined with the use of [$LookupMatchingLocaleByBestFit$], this means {{AISummarizerFactory/availability()}} will give the following answers: - function inputLangAvailable(languageTag) { - return ai.summarizer.available({ + function inputLangAvailability(languageTag) { + return ai.summarizer.availability({ expectedInputLanguages: [languageTag] }); } - inputLangAvailable("zh") === "after-download"; - inputLangAvailable("zh-Hant") === "readily"; - inputLangAvailable("zh-Hans") === "after-download"; + inputLangAvailability("zh") === "after-download"; + inputLangAvailability("zh-Hant") === "readily"; + inputLangAvailability("zh-Hans") === "after-download"; - inputLangAvailable("zh-TW") === "readily"; // zh-TW will best-fit to zh-Hant - inputLangAvailable("zh-HK") === "readily"; // zh-HK will best-fit to zh-Hant - inputLangAvailable("zh-CN") === "after-download"; // zh-CN will best-fit to zh-Hans + inputLangAvailability("zh-TW") === "readily"; // zh-TW will best-fit to zh-Hant + inputLangAvailability("zh-HK") === "readily"; // zh-HK will best-fit to zh-Hant + inputLangAvailability("zh-CN") === "after-download"; // zh-CN will best-fit to zh-Hans - inputLangAvailable("zh-BR") === "after-download"; // zh-BR will best-fit to zh - inputLangAvailable("zh-Kana") === "after-download"; // zh-Kana will best-fit to zh + inputLangAvailability("zh-BR") === "after-download"; // zh-BR will best-fit to zh + inputLangAvailability("zh-Kana") === "after-download"; // zh-Kana will best-fit to zh
@@ -1026,7 +1026,7 @@ Just IDL for now; full spec coming! [Exposed=(Window,Worker), SecureContext] interface AIWriterFactory { Promise create(optional AIWriterCreateOptions options = {}); - Promise available(optional AIWriterCreateCoreOptions options = {}); + Promise availability(optional AIWriterCreateCoreOptions options = {}); }; [Exposed=(Window,Worker), SecureContext] @@ -1081,7 +1081,7 @@ Just IDL for now; full spec coming! [Exposed=(Window,Worker), SecureContext] interface AIRewriterFactory { Promise create(optional AIRewriterCreateOptions options = {}); - Promise available(optional AIRewriterCreateCoreOptions options = {}); + Promise availability(optional AIRewriterCreateCoreOptions options = {}); }; [Exposed=(Window,Worker), SecureContext]