background-fetch icon indicating copy to clipboard operation
background-fetch copied to clipboard

Is the backgroundfetched event badly named?

Open jakearchibald opened this issue 7 years ago • 1 comments

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.

jakearchibald avatar Mar 16 '17 22:03 jakearchibald

Arguably it should be "background fetches" since it's a bundle. And then "end" or some such becomes much easier.

annevk avatar Mar 17 '17 05:03 annevk