proposal-signals
proposal-signals copied to clipboard
"Signal.subtle.Watcher.prototype.watch(...signals)" phase 4 is vague
In "Method: Signal.subtle.Watcher.prototype.watch(...signals)" we have:
- Add this watcher as a sink to each Signal. If this was the first sink, then recurse up to sources to add that signal as a sink, and call the watched callback if it exists.
It's not immediately clear for the first sentence whether this means the newly watched signals (which is spelled out explicitly in phase 3 immediately beforehand) or all sources.
It's also not clear what "recurse up to the sources" means; especially with the watched callback being called I think it's worth being quite explicit about the algorithm and ordering here.
@prophile to fix this wording