get indexedDb quota storage information

Viewed 2065

I have tried below code to get indexedDb quota storage information

navigator.webkitTemporaryStorage.queryUsageAndQuota ( 
function(usedBytes, grantedBytes) {  
    console.log('we are using ', usedBytes, ' of ', grantedBytes, 'bytes');
}, 
function(e) { console.log('Error', e);  }
); 

It is not working and giving the following error.

Property 'webkitTemporaryStorage' does not exist on type 'Navigator'.

Can anyone provide solution for getting indexedDb quota storage information in typescript?

1 Answers
Related