@@ -204,16 +204,16 @@ In all cases, the exception used for rejecting promises or erroring `ReadableStr
204
204
// Shared self.ai APIs
205
205
206
206
partial interface WindowOrWorkerGlobalScope {
207
- [Replaceable] readonly attribute AI ai;
207
+ [Replaceable, SecureContext ] readonly attribute AI ai;
208
208
};
209
209
210
- [Exposed=(Window,Worker)]
210
+ [Exposed=(Window,Worker), SecureContext ]
211
211
interface AI {
212
212
readonly attribute AITranslatorFactory translator;
213
213
readonly attribute AILanguageDetectorFactory languageDetector;
214
214
};
215
215
216
- [Exposed=(Window,Worker)]
216
+ [Exposed=(Window,Worker), SecureContext ]
217
217
interface AICreateMonitor : EventTarget {
218
218
attribute EventHandler ondownloadprogress;
219
219
@@ -229,13 +229,13 @@ enum AICapabilityAvailability { "readily", "after-download", "no" };
229
229
``` webidl
230
230
// Translator
231
231
232
- [Exposed=(Window,Worker)]
232
+ [Exposed=(Window,Worker), SecureContext ]
233
233
interface AITranslatorFactory {
234
234
Promise<AITranslator> create(AITranslatorCreateOptions options);
235
235
Promise<AITranslatorCapabilities> capabilities();
236
236
};
237
237
238
- [Exposed=(Window,Worker)]
238
+ [Exposed=(Window,Worker), SecureContext ]
239
239
interface AITranslator {
240
240
Promise<DOMString> translate(DOMString input, optional AITranslatorTranslateOptions options = {});
241
241
ReadableStream translateStreaming(DOMString input, optional AITranslatorTranslateOptions options = {});
@@ -246,7 +246,7 @@ interface AITranslator {
246
246
undefined destroy();
247
247
};
248
248
249
- [Exposed=(Window,Worker)]
249
+ [Exposed=(Window,Worker), SecureContext ]
250
250
interface AITranslatorCapabilities {
251
251
readonly attribute AICapabilityAvailability available;
252
252
@@ -269,21 +269,21 @@ dictionary AITranslatorTranslateOptions {
269
269
``` webidl
270
270
// Language detector
271
271
272
- [Exposed=(Window,Worker)]
272
+ [Exposed=(Window,Worker), SecureContext ]
273
273
interface AILanguageDetectorFactory {
274
274
Promise<AILanguageDetector> create(optional AILanguageDetectorCreateOptions options = {});
275
275
Promise<AILanguageDetectorCapabilities> capabilities();
276
276
};
277
277
278
- [Exposed=(Window,Worker)]
278
+ [Exposed=(Window,Worker), SecureContext ]
279
279
interface AILanguageDetector {
280
280
Promise<sequence<LanguageDetectionResult>> detect(DOMString input,
281
281
optional AILanguageDetectorDetectOptions options = {});
282
282
283
283
undefined destroy();
284
284
};
285
285
286
- [Exposed=(Window,Worker)]
286
+ [Exposed=(Window,Worker), SecureContext ]
287
287
interface AILanguageDetectorCapabilities {
288
288
readonly attribute AICapabilityAvailability available;
289
289
0 commit comments