[Fetch-Based API] `SendSignal`
mingyc opened this issue · 5 comments
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.
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.
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@ 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 thanbackgroundTimeout
If the document is in BFCache, how would you receive that promise? When you're restored from BFCache?
It can only be received and triggered after restored from BFCache. But at least users can know that their request has been sent.
SendSignal
is now the returned FetchLaterResult.activated
field in fetchLater()
API. See https://whatpr.org/fetch/1647.html#dom-fetchlaterresult-activated