Last active
August 29, 2015 14:13
-
-
Save nolanlawson/2cf0c9839ea8b64439ba to your computer and use it in GitHub Desktop.
Test basic WebSQL usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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', 5000000, function (db) { log('opened new database'); }); | |
log('opened database'); | |
} catch (err) { | |
log('got an error'); | |
log(err); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment