Skip to content

Commit 5c4116c

Browse files
committed
Editorial: change global object access style
Part of #56.
1 parent 86a502c commit 5c4116c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

index.bs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,7 +2176,11 @@ Every [=interface=] [=interface/including=] the {{DestroyableModel}} interface m
21762176
<div algorithm>
21772177
To <dfn export>measure AI model input usage</dfn> given an {{DestroyableModel}} |modelObject|, an [=ordered map=] |options|, and an algorithm |measure|:
21782178

2179-
1. If |modelObject|'s [=relevant global object=] is a {{Window}} whose [=associated Document=] is not [=Document/fully active=], then return [=a promise rejected with=] an "{{InvalidStateError}}" {{DOMException}}.
2179+
1. Let |global| be |modelObject|'s [=relevant global object=].
2180+
2181+
1. [=Assert=]: |global| is a {{Window}} object.
2182+
2183+
1. If |global|'s [=associated Document=] is not [=Document/fully active=], then return [=a promise rejected with=] an "{{InvalidStateError}}" {{DOMException}}.
21802184

21812185
1. Let |signals| be « |modelObject|'s [=DestroyableModel/destruction abort controller=]'s [=AbortController/signal=] ».
21822186

@@ -2204,7 +2208,7 @@ Every [=interface=] [=interface/including=] the {{DestroyableModel}} interface m
22042208

22052209
1. Let |result| be the result of performing |measure| given |stopMeasuring|.
22062210

2207-
1. [=Queue a global task=] on the [=AI task source=] given |modelObject|'s [=relevant global object=] to perform the following steps:
2211+
1. [=Queue a global task=] on the [=AI task source=] given |global| to perform the following steps:
22082212

22092213
1. If |abortedDuringMeasurement| is true, then [=reject=] |promise| with |compositeSignal|'s [=AbortSignal/abort reason=].
22102214

0 commit comments

Comments
 (0)