diff options
author | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-07 17:29:45 +0000 |
---|---|---|
committer | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-07 17:29:45 +0000 |
commit | 9ad935f7cd41740e4db1a708a1ab78b562801091 (patch) | |
tree | c016dcb7a0ed9027e4928b03d361c973028d8d22 /native_client_sdk | |
parent | b49f64077cb2c9994ef231ede1257e340434a918 (diff) | |
download | chromium_src-9ad935f7cd41740e4db1a708a1ab78b562801091.zip chromium_src-9ad935f7cd41740e4db1a708a1ab78b562801091.tar.gz chromium_src-9ad935f7cd41740e4db1a708a1ab78b562801091.tar.bz2 |
[NaCl SDK] Display the upload log from update_nacl_manifest.py in manifest.html.
BUG=none
R=sbc@chromium.org
Review URL: https://codereview.chromium.org/22475005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216222 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rw-r--r-- | native_client_sdk/src/web/manifest.html | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/native_client_sdk/src/web/manifest.html b/native_client_sdk/src/web/manifest.html index 49574b4..7da5a3f 100644 --- a/native_client_sdk/src/web/manifest.html +++ b/native_client_sdk/src/web/manifest.html @@ -54,14 +54,17 @@ <tbody id="rows"> </tbody> </table> + <h2>Most recent upload log:</h2> + <pre id="log"> + </pre> <script type="application/javascript"> - function loadJson(url, callback) { + function loadText(url, callback) { var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.onreadystatechange = function (e) { if (xhr.readyState == 4) { if (xhr.status == 200) { - callback(JSON.parse(xhr.responseText)); + callback(xhr.responseText); } else { alert("Failed to load: error " + xhr.status); } @@ -70,6 +73,12 @@ xhr.send(null); } + function loadJson(url, callback) { + loadText(url, function (text) { + callback(JSON.parse(text)); + }); + } + function removeAllChildren(elm) { while (elm.childNodes.length) { elm.removeChild(elm.firstChild); @@ -128,7 +137,12 @@ } } + function displayLog(text) { + document.getElementById('log').textContent = text; + } + loadJson('naclsdk_manifest2.json', display); + loadText('naclsdk_manifest2.json.log', displayLog); </script> </body> </html> |