Is there a Objective C interface/programmatic API to WKWebView that allows one to increase the size limit of a domain's localStorage? When I debug the embedded browser the created by the iOS Framework using the script below, I get a DOMException
with the message QuotaExceededError: DOM Exception 22
at approximately 2750KB of storage.
function gen(n) {
return new Array((n * 1024) + 1).join('a')
}
// Determine size of localStorage if it's not set
var i = 0;
try {
// Test up to 10 MB
for (i = 0; i <= 10000; i += 250) {
localStorage.setItem('test', gen(i));
}
} catch (e) {
console.log(e.message + ' : ' + i + 'KB size limit');
}
One can recreate the same error by running the script in Safari. Though I can understand why it would be desirable to disallow a script running in the browser itself to set the size through JavaScript, there must be a programmatic API in WebKit to modify this.