<!DOCTYPE html> | |
<title>Quota</title> | |
<script> | |
successCount = 0; | |
function successCallback(grantedBytes) { | |
successCount++; | |
window.document.title = 'Count: ' + successCount; | |
} | |
function errorCallback(error){ | |
window.document.title = 'deny'; | |
console.log('navigator.webkitPersistentStorage.requestQuota error: ', error); | |
} | |
function initiate_requestQuota(requestedBytes) { | |
navigator.webkitPersistentStorage.requestQuota( | |
requestedBytes, successCallback, errorCallback); | |
} | |
</script> |