workbox
workbox copied to clipboard
get response with backgroundsync
Library Affected: workbox-background-sync
Browser & Platform: all browsers
Issue or Feature Request Description: How can I get the server response when the backgroundsync was successfull? I am posting a task and I need the id from the API response.
I made a plugin for this: https://www.npmjs.com/package/@rrd/workbox-backgroundsync-message
At the moment it is for vue apps.
I think the easiest way to do it is to fire fetchDidSucceed event in the replayRequest() method. By that we would be able to hook in.