2
0
Fork 0

Fixed websql on android 4.x

This commit is contained in:
Willem 2016-01-23 19:25:20 +01:00
parent 81444d1198
commit 5a90140371
2 changed files with 7 additions and 5 deletions

View file

@ -162,7 +162,8 @@ A javascript library providing server defined loading of assets for a single pag
* Iceweasel 43
* Opera 12 Presto
* IE 11 Edge
* Android 5 in Cordova
* Android 5.1.1 in Cordova + Site
* Android 4.2.2 in Cordova + Site
## Todo
@ -185,6 +186,7 @@ Add unit tests for any new or changed functionality. Lint and test your code.
### 0.1.1
* Moved websql delete timeout to cleanServerlUrl for faster boot.
* Fixed websql db-size and db-name for older androids.
* Added more jsdoc
### 0.1.0

View file

@ -174,8 +174,8 @@
},
websql: function(opt) {
if (opt === undefined) { opt = {}; }
if (opt.name === undefined) { opt.name = 'ffSpaLoader.db'; }
if (opt.size === undefined) { opt.size = -1; }
if (opt.name === undefined) { opt.name = 'FFSpaLoader'; }
if (opt.size === undefined) { opt.size = 4 * 1024 * 1024; } // reg 4MB let user do higher
if (opt.version === undefined) { opt.version = '1.0'; }
if (opt.openDatabase === undefined) { opt.openDatabase = rootWindow.openDatabase; }
var nullDataHandler = function(cb) {
@ -292,10 +292,10 @@
try {
var stack = err.stack || '';
stack = stack.split('\n').map(function (line) { return line.trim(); });
stack = stack.split('\n').map(function (line) { return line.trim()+'\n'; });
var stackText = stack.splice(stack[0] === 'Error' ? 2 : 1);
var traceTag = document.createElement('div');
var traceTag = document.createElement('pre');
traceTag.appendChild(document.createTextNode(stackText));
rootTag.appendChild(traceTag);
} catch (stackError) {