workbox icon indicating copy to clipboard operation
workbox copied to clipboard

get response with backgroundsync

Open rrd108 opened this issue 5 years ago • 1 comments

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.

rrd108 avatar Jan 01 '21 16:01 rrd108

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.

rrd108 avatar Jan 08 '21 12:01 rrd108