diff --git a/spec.bs b/spec.bs
index 3d8a171..cd068b0 100644
--- a/spec.bs
+++ b/spec.bs
@@ -164,13 +164,13 @@ interface Subscriber {
Each {{Subscriber}} has a next algorithm, which is a [=internal
-observer/next steps=]-or-null.
+observer/next steps=].
Each {{Subscriber}} has a error algorithm, which is an [=internal
-observer/error steps=]-or-null.
+observer/error steps=].
Each {{Subscriber}} has a complete algorithm, which is a [=internal
-observer/complete steps=]-or-null.
+observer/complete steps=].
Each {{Subscriber}} has a teardown callbacks, which is a [=list=] of
{{VoidFunction}}s, initially empty.
@@ -198,11 +198,12 @@ The signal
getter steps are to
next(|value|)
method steps are:
+ 1. If [=this=]'s [=Subscriber/active=] is false, then return.
+
1. If [=this=]'s [=relevant global object=] is a {{Window}} object, and its [=associated
Document=] is not [=Document/fully active=], then return.
- 1. If [=this=]'s [=Subscriber/next algorithm=] is not null, then run [=this=]'s
- [=Subscriber/next algorithm=] given |value|.
+ 1. Run [=this=]'s [=Subscriber/next algorithm=] given |value|.
[=Assert=]: No exception was thrown.
@@ -220,37 +221,35 @@ The signal
getter steps are to
error(|error|)
method steps are:
+ 1. If [=this=]'s [=Subscriber/active=] is false, [=report the exception=] |error|, then return.
+
1. If [=this=]'s [=relevant global object=] is a {{Window}} object, and its [=associated
Document=] is not [=Document/fully active=], then return.
- 1. Let |error algorithm| be [=this=]'s [=Subscriber/error algorithm=].
-
1. [=close a subscription|Close=] [=this=].
1. [=AbortController/Signal abort=] [=this=]'s [=Subscriber/complete or error controller=].
- 1. If |error algorithm| is not null, then run |error algorithm| given |error|.
+ 1. Run [=this=]'s [=Subscriber/error algorithm=] given |error|.
[=Assert=]: No exception was thrown.
Note: See the documentation in {{Subscriber/next()}} for details on why this is true.
-
- 1. Otherwise (i.e., when |error algorithm| is null), [=report the exception=] |error|.
complete()
method steps are:
+ 1. If [=this=]'s [=Subscriber/active=] is false, then return.
+
1. If [=this=]'s [=relevant global object=] is a {{Window}} object, and its [=associated
Document=] is not [=Document/fully active=], then return.
- 1. Let |complete algorithm| be [=this=]'s [=Subscriber/complete algorithm=].
-
1. [=close a subscription|Close=] [=this=].
1. [=AbortController/Signal abort=] [=this=]'s [=Subscriber/complete or error controller=].
- 1. If |complete algorithm| is not null, then run |complete algorithm|.
+ 1. Run [=this=]'s [=Subscriber/complete algorithm=].
[=Assert=]: No exception was thrown.
@@ -277,9 +276,6 @@ The signal
getter steps are to
1. Set |subscriber|'s [=Subscriber/active=] boolean to false.
- 1. Set |subscriber|'s [=Subscriber/next algorithm=], [=Subscriber/error algorithm=], and
- [=Subscriber/complete algorithm=] all to null.
-
This algorithm intentionally does not have script-running side-effects; it just updates the internal state of a {{Subscriber}}. It's important that this algorithm sets