background-fetch
background-fetch copied to clipboard
Is the backgroundfetched event badly named?
Some background:
The backgroundfetched
event fires in the service worker once the background fetch operation is complete, as in we can provide a full response for every request within the background fetch operation.
The event name is a little weird and past-tense because I felt like this may be too similar to the fetch
event, which fires early on in fetch. I also considered backgroundfetchcomplete
(which felt really long) and backgroundfetchend
(which felt a little clunky).
@annevk is there any prior art you're aware of for the above?
The event constructor is currently BackgroundFetchEndEvent
, which is wrong, as it should mirror the name. I'll fix that now.
Arguably it should be "background fetches" since it's a bundle. And then "end" or some such becomes much easier.