Skip to content

Commit 4733c27

Browse files
Gate registerTool() on document.domain being disabled (#197)
1 parent bc9c77a commit 4733c27

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

index.bs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,16 @@ spec:html; type:dfn;
9292
text:form-associated element
9393
text:browsing context group set
9494
text:unique internal value
95+
text:is origin-keyed
9596
</pre>
9697
<pre class="anchors">
9798
spec: SECURE-CONTEXTS; urlPrefix: https://w3c.github.io/webappsec-secure-contexts/
9899
type: abstract-op
99100
text: is origin potentially trustworthy?; url: is-origin-trustworthy
101+
spec: ECMASCRIPT; urlPrefix: https://tc39.es/ecma262/
102+
type: dfn
103+
text: surrounding agent; url: surrounding-agent
104+
text: agent cluster; url: sec-agent-clusters
100105
</pre>
101106

102107
<h2 id="intro">Introduction</h2>
@@ -332,6 +337,11 @@ The <dfn method for=ModelContext>registerTool(<var>tool</var>, <var>options</var
332337
1. If |tool owner| is not [=Document/fully active=], then [=exception/throw=] an
333338
"{{InvalidStateError}}" {{DOMException}}.
334339

340+
1. If this's [=surrounding agent=]'s [=agent cluster=]'s [=is origin-keyed=] is false
341+
and this's [=relevant settings object=]'s [=environment settings object/origin=]'s
342+
[=origin/scheme=] is not <code>"file"</code>, then [=exception/throw=] a "{{SecurityError}}"
343+
{{DOMException}}.
344+
335345
1. If |tool owner| is not [=allowed to use=] the "{{tools}}" feature, then [=exception/throw=] a
336346
"{{NotAllowedError}}" {{DOMException}}.
337347

0 commit comments

Comments
 (0)