diff options
Diffstat (limited to 'native_client_sdk/src/examples/file_io/index.html')
| -rw-r--r-- | native_client_sdk/src/examples/file_io/index.html | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/native_client_sdk/src/examples/file_io/index.html b/native_client_sdk/src/examples/file_io/index.html index 6455157..a71a3d1 100644 --- a/native_client_sdk/src/examples/file_io/index.html +++ b/native_client_sdk/src/examples/file_io/index.html @@ -50,7 +50,7 @@ if (messageParts[0] == "ERR") { updateStatus(messageParts[1]); - document.getElementById('status_field').style.color = "red"; + document.getElementById('statusField').style.color = "red"; } else if(messageParts[0] == "STAT") { updateStatus(messageParts[1]); @@ -60,13 +60,13 @@ document.getElementById('file_editor').value = messageParts[1]; } else if (messageParts[0] == "READY") { - var statusField = document.getElementById('status_field'); + var statusField = document.getElementById('statusField'); updateStatus(statusField.innerHTML + ' Ready!'); } } </script> </head> -<body onload="pageDidLoad('<NAME>', '<tc>')"> +<body> <h1><TITLE></h1> <h2>Status: <code id="statusField">NO-STATUS</code></h2> @@ -86,6 +86,12 @@ --> <div id="listener"> <script type="text/javascript"> + window.webkitStorageInfo.requestQuota(window.PERSISTENT, 1024*1024, + function(bytes) { + updateStatus('Allocated '+bytes+' bytes of persistant storage.'); + createNaClModule('<NAME>', '<tc>', 200, 200); + }, + function(e) { alert('Failed to allocate space') }); var listener = document.getElementById('listener') listener.addEventListener('load', moduleDidLoad, true); listener.addEventListener('message', handleMessage, true); |
