Skip to content

Instantly share code, notes, and snippets.

Created Jan 14, 2015
What would you like to do?
SecurityError: DOM Exception 18 (Refresh and/or force-close and re-open browser until this bug appears)
<h1>Test basic WebSQL usage</h1>
<h2>Refresh this page until you see the error (in Chrome for iOS)</h2>
<pre id="display"></pre>
function log(str) {
document.getElementById('display').innerHTML += str.toString() + '\n';
try {
var db = openDatabase('mydatabase', 1, 'mydatabase', 50000000);
log('opened database using an integer version');
} catch (err) {
log('got an error using an integer version');
try {
var db = openDatabase('mydatabase', '1', 'mydatabase', 50000000);
log('opened database using a string version');
} catch (err) {
log('got an error using a string version');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment