Merged
Conversation
Edge 18 is quite old and no longer supported on GitHub.com. Additionally, using User Agent sniffing is not a robust way to handle this. Should this be needed, it could be moved upstream, as it really overloads the `quoteMarkdown` option. Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
BREAKING CHANGE Subscribe is useful in a world where Observables move forward, but that looks somewhat unlikely, and it's a fairly un-idiomatic pattern outside of Observables. There are better mechanisms for this. If someone needs to wrap this library in an Observable, install/uninstall can be wrapped directly. Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
This drastically reduces the amount of complex state we need to keep track of just to unbind event listeners. Co-authored-by: Kate Higa <khiga8@github.com>
This reduces the need for fetching options from a WeakMap which is side-effectful, allowing these methods to be called without a prior `install()` call. Co-authored-by: Kate Higa <khiga8@github.com>
This allows users calling the `install()` method to supply their own `signal`, which negates the need for `uninstall()`, as aborting the given signal has the same effect. Co-authored-by: Kate Higa <khiga8@github.com>
BREAKING CHANGE Now we have an exposed `signal` option, we can simply use this to provide a way for users to "uninstall" these event listeners. `uninstall` is no longer needed. Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
srt32
reviewed
Nov 2, 2021
srt32
reviewed
Nov 2, 2021
This was referenced Nov 3, 2021
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
This PR removes
subscribe/unsubscribeand alsouninstallin favour of one single interface:install(container, { signal }).signalis anAbortSignalwhich can be triggered to invoke the same behaviouruninstalldid.We also drop "support" for Edge 18 in this PR.
This should be considered a breaking change.
Why?
I think the commits explain each decision quite nicely, but to quote: