WICG / pending-beacon

A better beaconing API
Other
43 stars 8 forks source link

[Fetch-Based API] `sendAfterBeingBackgroundedTimeout` and `deferSend` #73

Closed mingyc closed 9 months ago

mingyc commented 1 year ago

Context: #70 and #71

class DeferSend {
  constructor(sendAfterBeingBackgroundedTimeout)
}

Current proposal is to make deferSend a class, and sendAfterBeingBackgroundedTimeout its optional field.

  1. Should this be a standalone option in [RequestInit]? But it is not relevant to other existing fetch options.
  2. Should the timeout support sending after hidden or pagehide (bfcached)? (Previous discussion in #13).
  3. Need user input for how desirable for this option.
  4. Need better naming suggestion.
mingyc commented 1 year ago

@yoavweiss @clelland @philipwalton @annevk Could you please take a look?

philipwalton commented 1 year ago

(Adding @tunetheweb to take a look while I'm on leave.)

yoavweiss commented 1 year ago

^^ @noamr

yoavweiss commented 1 year ago

@mingyc - I think this is quite different from the Controller-based design we discussed. Let's sync about this.

mingyc commented 1 year ago

The SendSignal controller is tracked in https://github.com/WICG/pending-beacon/issues/75

mingyc commented 9 months ago