Skip to content

Instantly share code, notes, and snippets.

@jkndrkn
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkndrkn/f409dc8df93139491b82 to your computer and use it in GitHub Desktop.
Save jkndrkn/f409dc8df93139491b82 to your computer and use it in GitHub Desktop.
SecurityError DOM Exception 18 Test for Chrome on iOS
<html>
<body>
<h1>Test basic WebSQL usage</h1>
<h2>Refresh this page until you see the error (in Chrome for iOS)</h2>
<pre id="display"></pre>
<script>
function log(str) {
document.getElementById('display').innerHTML += str.toString() + '\n';
}
try {
var db = openDatabase('mydatabase', 1, 'mydatabase', 50000000, function (db) { log('opened new database using an integer version'); });
log('opened database using an integer version');
} catch (err) {
log('got an error using an integer version');
log(err);
}
try {
var db = openDatabase('mydatabase', '1', 'mydatabase', 50000000, function (db) { log('opened new database using a string'); });
log('opened database using a string version');
} catch (err) {
log('got an error using a string version');
log(err);
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment