Open
Description
imagine a senario that you need to download or upload large data. you don't want users to use up all mobile data. so the solution would be to only do it when using wifi or ethernet network.
The solution i would wish for would be something like setting a connectionType for when the request should be initiated on:
/*
ConnectionType =
| 'bluetooth'
| 'cellular'
| 'ethernet'
| 'mixed'
| 'none'
| 'other'
| 'unknown'
| 'wifi'
| 'wimax';
*/
const request = new Request('/upload', { body, method: 'POST' })
swReg.backgroundFetch.fetch(id, request, {
// possible types: http://wicg.github.io/netinfo/#connection-types
connectionType: ['wifi', 'ethernet']
})
Metadata
Metadata
Assignees
Labels
No labels