Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling ongoing operations / subsequent call to get() #159

Open
marcoscaceres opened this issue Aug 18, 2024 · 1 comment
Open

Handling ongoing operations / subsequent call to get() #159

marcoscaceres opened this issue Aug 18, 2024 · 1 comment
Assignees

Comments

@marcoscaceres
Copy link
Collaborator

The spec is currently missing a model for dealing with subsequent call to get() (i.e., subsequently calling .get()).

We have two options. A subsequent call to get():

  1. aborts the current get request (AbortError). New call to get() takes over.
  2. gets aborted or invalidated (with the respective exceptions). Current call continues until it settles.

Given that we always show UI, the implications of 1 could be annoying to users. It would mean it would that it could be used to serve the same purpose as the abort controller.

Thus, my preference is that we use 2, as it prevents accidental tear down of the presentment UI. Developers can still tear down the UI with the abort controller whenever they choose.

Thoughts?

@samuelgoto
Copy link
Collaborator

samuelgoto commented Aug 21, 2024

Thoughts?

Option (2) SGTM, that's what we do for FedCM too: we consider it a developer error, because they could have used the AbortController to cancel the first request if they wanted to.

w3c-fedid/FedCM#340

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants