WebAPI/DeviceIndexedDB: Difference between revisions

Line 51: Line 51:
Following is an example of finding Apps providing DataCloudStorage services with DeviceIndexedDB as the application chooser.
Following is an example of finding Apps providing DataCloudStorage services with DeviceIndexedDB as the application chooser.


  var request = window.deviceIndexedDB.open("[SystemService]");
  var request = window.deviceIndexedDB.open("[SystemServices]");
  request.onsuccess = function () {
  request.onsuccess = function () {
   var db = request.result;
   var db = request.result;
Line 65: Line 65:
  }
  }


The "[SystemService]" database is not necessary a real persistent data storage, it is implemented by the platform (Gecko) to provide the service.  The line, chooserByIntent.get("DataCloudStorage"), would launch a application chooser by the platform.  It return a list of applications once the user finish his selection.
The "[SystemServices]" database is not necessary a real persistent data storage, it is implemented by the platform (Gecko) to provide the service.  The line, chooserByIntent.get("DataCloudStorage"), would launch a application chooser by the platform.  It return a list of applications once the user finish his selection.
 
{
  name: "My Applicaiton",
  ......
  deviceIndexedDB: {
      "[SystemServices]": {
          "Applications": {
              "ObjectStore": "none",
              "index": {
                  "chooserByIntent": ["DataCloudStorage"],
              }
          }
      }
  }
}
Confirmed users
398

edits