1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 window.onload = function() {
6 setTimeout(loadCrashes, 0);
9 function loadCrashes() {
10 if (navigator.getDeviceStorage) {
11 var storage = navigator.getDeviceStorage("apps");
13 var getRequest = storage.get("b2g/mozilla/Crash\ Reports/submitted");
15 getRequest.onsuccess = function() {
16 document.getElementById("error").textContent = "got access";
18 getRequest.onerror = function() {
19 var errmsg = getRequest.error && getRequest.error.name;
20 document.getElementById("error").textContent = errmsg;
24 document.getElementById("error").textContent = "apps storage not available";
28 document.getElementById("error").textContent = "no device storage";