Confirmed users
1,340
edits
No edit summary |
|||
| (2 intermediate revisions by one other user not shown) | |||
| Line 86: | Line 86: | ||
Since "[SystemServices]" database is implemented by the platform code, writing actions may be forbidden by the implementation according the security model of the data. | Since "[SystemServices]" database is implemented by the platform code, writing actions may be forbidden by the implementation according the security model of the data. | ||
=== Expose Network Statistic of Apps == | === Expose Network Statistic of Apps === | ||
This is an example of exposing network statistics of Apps with DeviceIndexedDB. | This is an example of exposing network statistics of Apps with DeviceIndexedDB. | ||
| Line 96: | Line 96: | ||
var apps = store.index("apps"); | var apps = store.index("apps"); | ||
var statisrequest = apps.get(" | var statisrequest = apps.get("any-app-id"); | ||
statisrequest.onsuccess = function () { | statisrequest.onsuccess = function () { | ||
var statistic = statisrequest.result; | var statistic = statisrequest.result; | ||
| Line 102: | Line 102: | ||
} | } | ||
} | } | ||
{ | |||
name: "My Applicaiton", | |||
...... | |||
mozDeviceIndexedDB: { | |||
"[SystemServices]": { | |||
"NetworkStatistics": { | |||
"ObjectStore": "none", | |||
"index": { | |||
"apps": ["any-app-id"], | |||
} | |||
} | |||
} | |||
} | |||
} | |||
[[Category:Web APIs]] | |||