@@ -177,14 +177,8 @@ interface Subscriber {
177
177
};
178
178
</xmp>
179
179
180
- Each {{Subscriber}} has a <dfn for=Subscriber>next algorithm</dfn> , which is a [=internal
181
- observer/next steps=] .
182
-
183
- Each {{Subscriber}} has a <dfn for=Subscriber>error algorithm</dfn> , which is an [=internal
184
- observer/error steps=] .
185
-
186
- Each {{Subscriber}} has a <dfn for=Subscriber>complete algorithm</dfn> , which is a [=internal
187
- observer/complete steps=] .
180
+ Each {{Subscriber}} has a <dfn for=Subscriber>internal observer</dfn> , which is an [=internal
181
+ observer=] .
188
182
189
183
Each {{Subscriber}} has a <dfn for=Subscriber>teardown callbacks</dfn> , which is a [=list=] of
190
184
{{VoidFunction}} s, initially empty.
@@ -211,18 +205,20 @@ The <dfn attribute for=Subscriber><code>signal</code></dfn> getter steps are to
211
205
1. If [=this=] 's [=relevant global object=] is a {{Window}} object, and its [=associated
212
206
Document=] is not [=Document/fully active=] , then return.
213
207
214
- 1. Run [=this=] 's [=Subscriber/next algorithm=] given |value|.
208
+ 1. Run [=this=] 's [=Subscriber/internal observer=]' s [=internal observer/next steps=] given
209
+ |value|.
215
210
216
211
[=Assert=] : No <a spec=webidl lt="an exception was thrown">exception was thrown</a> .
217
212
218
213
<div class=note>
219
- <p> Note: No exception can be thrown here because in the case where [=Subscriber/next
220
- algorithm=] is just a wrapper around a script-provided callback, the <a
221
- href=#process-observer> process observer</a> steps take care to wrap these callbacks in
222
- logic that, when invoking them, catches any exceptions, and reports them to the global.</p>
223
-
224
- <p> When the [=Subscriber/next algorithm=] is a spec algorithm, those steps take care to not
225
- throw any exceptions outside of itself, to appease this assert.</p>
214
+ <p> Note: No exception can be thrown here because in the case where the
215
+ [=Subscriber/internal observer=] 's [=internal observer/next steps=] is just a wrapper
216
+ around a script-provided callback, the <a href=#process-observer>process observer</a> steps
217
+ take care to wrap these callbacks in logic that, when invoking them, catches any
218
+ exceptions, and reports them to the global.</p>
219
+
220
+ <p> When the [=internal observer/next steps=] is a spec algorithm, those steps take care to
221
+ not throw any exceptions outside of itself, to appease this assert.</p>
226
222
</div>
227
223
</div>
228
224
@@ -236,7 +232,8 @@ The <dfn attribute for=Subscriber><code>signal</code></dfn> getter steps are to
236
232
237
233
1. [=close a subscription|Close=] [=this=] .
238
234
239
- 1. Run [=this=] 's [=Subscriber/error algorithm=] given |error|.
235
+ 1. Run [=this=] 's [=Subscriber/internal observer=]' s [=internal observer/error steps=] given
236
+ |error|.
240
237
241
238
[=Assert=] : No <a spec=webidl lt="an exception was thrown">exception was thrown</a> .
242
239
@@ -253,7 +250,7 @@ The <dfn attribute for=Subscriber><code>signal</code></dfn> getter steps are to
253
250
254
251
1. [=close a subscription|Close=] [=this=] .
255
252
256
- 1. Run [=this=] 's [=Subscriber/complete algorithm =] .
253
+ 1. Run [=this=] 's [=Subscriber/internal observer=]' s [=internal observer/ complete steps =] .
257
254
258
255
[=Assert=] : No <a spec=webidl lt="an exception was thrown">exception was thrown</a> .
259
256
@@ -735,16 +732,9 @@ An <dfn>internal observer</dfn> is a [=struct=] with the following [=struct/item
735
732
error algorithm=] , or an algorithm that [=invokes=] the provided {{SubscriptionObserver/error}}
736
733
[=callback function=] .
737
734
738
- 1. Let |subscriber| be a [=new=] {{Subscriber}} , initialized as:
739
-
740
- : [=Subscriber/next algorithm=]
741
- :: |internal observer|'s [=internal observer/next steps=]
742
-
743
- : [=Subscriber/error algorithm=]
744
- :: |internal observer|'s [=internal observer/error steps=]
735
+ 1. Let |subscriber| be a [=new=] {{Subscriber}} .
745
736
746
- : [=Subscriber/complete algorithm=]
747
- :: |internal observer|'s [=internal observer/complete steps=]
737
+ 1. Set |subscriber|'s [=Subscriber/internal observer=] to |internal observer|.
748
738
749
739
1. If |options|'s {{SubscribeOptions/signal}} [=map/exists=] , then:
750
740
0 commit comments