Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
Test basic WebSQL usage
<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', 5000000, function (db) { log('opened new database'); });
log('opened database');
} catch (err) {
log('got an error');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment