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

[Fetch-Based API] SendSignal #75

Closed
mingyc opened this issue Mar 24, 2023 · 5 comments
Closed

[Fetch-Based API] SendSignal #75

mingyc opened this issue Mar 24, 2023 · 5 comments
Labels
api Issue with API specs discussion fetch-based-api Fetch-based API design

Comments

@mingyc
Copy link
Collaborator

mingyc commented Mar 24, 2023

Context: #70 #71

This is to observe a event to tell if a deferSend request is still pending.

To prevent from data races, the underlying implementation should ensure that renderer is authoritative to the request's send state when it's alive. Similar to this discussion for PendingBeacon.

mingyc added a commit to mingyc/pending-beacon that referenced this issue Mar 24, 2023
- Previous discussions about fetch-based API are in WICG#70, WICG#52, WICG#50, WebKit/standards-positions#85 (comment)
- Related new discussions in WICG#71, WICG#72, WICG#73, WICG#74, WICG#75
mingyc added a commit to mingyc/pending-beacon that referenced this issue Mar 24, 2023
- Previous discussions about fetch-based API are in WICG#70, WICG#52, WICG#50, WebKit/standards-positions#85 (comment)
- Related new discussions in WICG#71, WICG#72, WICG#73, WICG#74, WICG#75
mingyc added a commit to mingyc/pending-beacon that referenced this issue Mar 24, 2023
- Previous discussions about fetch-based API are in WICG#70, WICG#52, WICG#50, WebKit/standards-positions#85 (comment)
- Related new discussions in WICG#72, WICG#73, WICG#74, WICG#75, WICG#76, WICG#77
@mingyc mingyc added discussion api Issue with API specs labels Mar 24, 2023
mingyc added a commit that referenced this issue Mar 24, 2023
- Previous discussions about fetch-based API are in #70, #52, #50, WebKit/standards-positions#85 (comment)
- Related new discussions in #72, #73, #74, #75, #76, #77
@mingyc mingyc added the fetch-based-api Fetch-based API design label Mar 28, 2023
@noamr
Copy link
Contributor

noamr commented Mar 28, 2023

See [https://github.com//issues/70#issuecomment-1486404787]. I wonder if we need sentSignal, given a per-origin quota instead of a global quota for beacons.

@mingyc
Copy link
Collaborator Author

mingyc commented Apr 4, 2023

noamr@ Could you tell why sentSignal is bound to request quota?

Another reason to have it (or pending state) is to tell if the request has been sent if it stays in BFCache for more than backgroundTimeout

@noamr
Copy link
Contributor

noamr commented Apr 4, 2023

noamr@ Could you tell why sentSignal is bound to request quota?

Another reason to have it (or pending state) is to tell if the request has been sent if it stays in BFCache for more than backgroundTimeout

If the document is in BFCache, how would you receive that promise? When you're restored from BFCache?

@mingyc
Copy link
Collaborator Author

mingyc commented Apr 5, 2023

It can only be received and triggered after restored from BFCache. But at least users can know that their request has been sent.

mingyc added a commit to mingyc/pending-beacon that referenced this issue Jul 4, 2023
mingyc added a commit to mingyc/pending-beacon that referenced this issue Jul 4, 2023
mingyc added a commit to mingyc/pending-beacon that referenced this issue Jul 4, 2023
mingyc added a commit to mingyc/pending-beacon that referenced this issue Jul 4, 2023
mingyc added a commit that referenced this issue Jul 4, 2023
This PR adds overview and example codes for the draft `fetchLater()` API spec from whatwg/fetch#1647

The API will address the discussions in #70 #72 #73 #74 #75 #76.
@mingyc
Copy link
Collaborator Author

mingyc commented Nov 13, 2023

SendSignal is now the returned FetchLaterResult.activated field in fetchLater() API. See https://whatpr.org/fetch/1647.html#dom-fetchlaterresult-activated

@mingyc mingyc closed this as completed Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue with API specs discussion fetch-based-api Fetch-based API design
Projects
None yet
Development

No branches or pull requests

2 participants