blob: c82ea9f2d1cfb1f579396ad003e6328d1520fa0d [file] [log] [blame]
function requestUsage() {
port = self.port || self;
function errorCallback(error)
{
port.postMessage("errorCallback called");
}
function usageCallback(usage, quota)
{
port.postMessage("result: " + JSON.stringify({ usage: usage, quota: quota}));
}
port.postMessage("Requesting quota from " + navigator.webkitTemporaryStorage);
navigator.webkitTemporaryStorage.queryUsageAndQuota(usageCallback, errorCallback);
return true;
}