From 834719696a231a0ee5c851ae19f5bc9565f7add9 Mon Sep 17 00:00:00 2001 From: temi Date: Mon, 16 Oct 2023 15:28:05 +1100 Subject: [PATCH] - added storage API --- grails-app/assets/javascripts/entities.js | 8 +++++++- package.json | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/grails-app/assets/javascripts/entities.js b/grails-app/assets/javascripts/entities.js index 4230127..17a2ce0 100644 --- a/grails-app/assets/javascripts/entities.js +++ b/grails-app/assets/javascripts/entities.js @@ -839,7 +839,13 @@ var entities = (function () { } })(); -function getDB() { +async function getDB() { + if (navigator.storage && navigator.storage.persisted) { + const persistent = await navigator.storage.persisted(); + if (!persistent && navigator.storage.persist) + const result = await navigator.storage.persist(); + } + var DB_NAME = "biocollect"; var db = new Dexie(DB_NAME); db.version(4).stores({ diff --git a/package.json b/package.json index 61778fe..9fc012b 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@turf/convex": "^6.0.2", "@turf/length": "^6.0.2", "@turf/simplify": "^5.1.5", - "chromedriver": "^115.0.0", + "chromedriver": "^117.0.3", "geojson2svg": "^1.2.3", "handlebars": "^4.7.7", "jasmine-ajax": "^4.0.0",