Skip to content

Commit 6ac8736

Browse files
committed
Restrict to secure contexts
1 parent 6cf1568 commit 6ac8736

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,15 +313,15 @@ Finally, note that there is a sort of precedent in the (never-shipped) [`FetchOb
313313
// Shared self.ai APIs
314314
315315
partial interface WindowOrWorkerGlobalScope {
316-
[Replaceable] readonly attribute AI ai;
316+
[Replaceable, SecureContext] readonly attribute AI ai;
317317
};
318318
319-
[Exposed=(Window,Worker)]
319+
[Exposed=(Window,Worker), SecureContext]
320320
interface AI {
321321
readonly attribute AIAssistantFactory assistant;
322322
};
323323
324-
[Exposed=(Window,Worker)]
324+
[Exposed=(Window,Worker), SecureContext]
325325
interface AICreateMonitor : EventTarget {
326326
attribute EventHandler ondownloadprogress;
327327
@@ -337,13 +337,13 @@ enum AICapabilityAvailability { "readily", "after-download", "no" };
337337
```webidl
338338
// Assistant
339339
340-
[Exposed=(Window,Worker)]
340+
[Exposed=(Window,Worker), SecureContext]
341341
interface AIAssistantFactory {
342342
Promise<AIAssistant> create(optional AIAssistantCreateOptions options = {});
343343
Promise<AIAssistantCapabilities> capabilities();
344344
};
345345
346-
[Exposed=(Window,Worker)]
346+
[Exposed=(Window,Worker), SecureContext]
347347
interface AIAssistant : EventTarget {
348348
Promise<DOMString> prompt(DOMString input, optional AIAssistantPromptOptions options = {});
349349
ReadableStream promptStreaming(DOMString input, optional AIAssistantPromptOptions options = {});
@@ -362,7 +362,7 @@ interface AIAssistant : EventTarget {
362362
undefined destroy();
363363
};
364364
365-
[Exposed=(Window,Worker)]
365+
[Exposed=(Window,Worker), SecureContext]
366366
interface AIAssistantCapabilities {
367367
readonly attribute AICapabilityAvailability available;
368368

0 commit comments

Comments
 (0)