blob: 40a3c62c6e638baa4f2d27be17acd110f5b1baf1 [file] [log] [blame]
<!DOCTYPE html>
<script>
function databaseOpened(event) {
var getRequest = event.target.result.transaction(["foo"], "readwrite").objectStore("foo").put("value from detached iframe", "key");
getRequest.onsuccess = getRequestCallback;
getRequest.onerror = unexpectedErrorCallback;
}
function openDatabase(event) {
parent.detachIframe();
var openRequest = window.indexedDB.open("detached-iframe.html");
openRequest.onsuccess = databaseOpened;
openRequest.onblocked = openDatabase;
}
window.addEventListener("message", openDatabase, false);
</script>