2 function requestUsage() {
3 port = self.port || self;
4 function errorCallback(error)
6 port.postMessage("errorCallback called");
9 function usageCallback(usage, quota)
11 port.postMessage("result: " + JSON.stringify({ usage: usage, quota: quota}));
14 port.postMessage("Requesting quota from " + navigator.webkitTemporaryStorage);
15 navigator.webkitTemporaryStorage.queryUsageAndQuota(usageCallback, errorCallback);