* Detaches the observer from the mutation it is currently observing (if * any) and resets the observed result back to its default, `idle` state. * * This does not cancel an in-flight mutation; the mutation itself keeps * running to completion and its own callbacks still fire, but this
()
| 178 | * @see {@link MutationObserver#mutate} |
| 179 | */ |
| 180 | reset(): void { |
| 181 | // reset needs to remove the observer from the mutation because there is no way to "get it back" |
| 182 | // another mutate call will yield a new mutation! |
| 183 | this.#currentMutation?.removeObserver(this) |
| 184 | this.#currentMutation = undefined |
| 185 | this.#updateResult() |
| 186 | this.#notify() |
| 187 | } |
| 188 | |
| 189 | /** |
| 190 | * Builds a new `Mutation` in the `MutationCache` using the observer's |
no test coverage detected