diff --git a/index.bs b/index.bs index 46c95ea..363acf8 100644 --- a/index.bs +++ b/index.bs @@ -343,7 +343,7 @@ To notify documents of a tool change given a {{Document}} |tool owner 1. [=Assert=]: these steps are running [=in parallel=]. 1. Let |navigablesToNotify| be |tool owner|'s [=node navigable=]'s [=navigable/traversable - navigable=]'s [=Document/inclusive descendant navigables=]. + navigable=]'s [=navigable/active document=]'s [=Document/inclusive descendant navigables=]. 1. [=list/For each=] |navigable| of |navigablesToNotify|: @@ -478,7 +478,7 @@ internal value=] |uuid|, are as follows: Issue: Support more granular errors; here we should return something that prompts the caller to reject its {{Promise}} with a "{{DataError}}" {{DOMException}}. -1. If |inputObject| [=Object type|is not an Object=] is false, then run |completionSteps| given null +1. If |inputObject| [=Object type|is not an Object=], then run |completionSteps| given null and false, and abort these steps. Issue(#146): Specify and fire the "toolactivated" event. @@ -820,7 +820,7 @@ The getTools(options) method steps 1. Let |tools| be an empty [=list=] of {{RegisteredTool}} dictionaries. 1. Let |navigables| be |toolRequestor|'s [=node navigable=]'s [=navigable/traversable - navigable=]'s [=Document/inclusive descendant navigables=]. + navigable=]'s [=navigable/active document=]'s [=Document/inclusive descendant navigables=]. 1. [=list/For each=] |navigable| of |navigables|: @@ -1001,31 +1001,31 @@ The executeTool(tool, inputObject -

It is possible that a pending execution identified by |uuid| no longer exists. This can - happen due to a race between (a) tool cancellation when the caller document gets destroyed or when the caller aborts the - execution via the options signal; and (b) tool promise resolution. Both - of these race to invoke |completionSteps|, and the first invocation will remove the - pending execution by its key |uuid|, this check protects subsequent racing - invocations.

- +
+

It is possible that a pending execution identified by |uuid| no longer exists. This can + happen due to a race between (a) tool cancellation when the caller document gets destroyed or when the caller aborts the + execution via the options signal; and (b) tool promise resolution. Both + of these race to invoke |completionSteps|, and the first invocation will remove the + pending execution by its key |uuid|, this check protects subsequent racing + invocations.

+
- 1. [=map/Remove=] |targetDocument|'s [=node navigable=]'s [=navigable/traversable - navigable=]'s [=traversable navigable/pending tool executions map=][|uuid|]. + 1. [=map/Remove=] |targetDocument|'s [=node navigable=]'s [=navigable/traversable + navigable=]'s [=traversable navigable/pending tool executions map=][|uuid|]. - 1. If |success| is true, then [=queue a global task=] on the [=webmcp task source=] given - |callerDocument|'s [=relevant global object=] to [=resolve=] |promise| with |result|. + 1. If |success| is true, then [=queue a global task=] on the [=webmcp task source=] given + |callerDocument|'s [=relevant global object=] to [=resolve=] |promise| with |result|. - 1. Otherwise, [=queue a global task=] on the [=webmcp task source=] given |callerDocument|'s - [=relevant global object=] to [=reject=] |promise| with an "{{UnknownError}}" - {{DOMException}}. + 1. Otherwise, [=queue a global task=] on the [=webmcp task source=] given |callerDocument|'s + [=relevant global object=] to [=reject=] |promise| with an "{{UnknownError}}" + {{DOMException}}. 1. Let |execution| be a new [=pending tool execution=], with the following [=struct/items=]: