sockscape/client/src/FileCache.ts

18 lines
434 B
TypeScript
Raw Normal View History

2017-04-17 18:50:18 +00:00
class FileCache {
2017-04-18 04:59:38 +00:00
static dbHandle: IDBDatabase = null;
static Initialize(): void {
2017-04-19 12:10:47 +00:00
var request = window.indexedDB.open("fileCache", 1);
2017-04-19 21:05:28 +00:00
request.onupgradeneeded = function(event: any) {
var db: IDBDatabase = event.target.result;
db.createObjectStore("files", {keyPath: "name"});
2017-04-19 12:10:47 +00:00
};
2017-04-21 02:12:55 +00:00
request.onsuccess = function(event: any) {
}
2017-04-17 18:50:18 +00:00
}
2017-04-19 21:05:28 +00:00
static
2017-04-17 18:50:18 +00:00
}