1 <html manifest="/appcache/resources/main-resource-hash-frame.manifest#foo"> 2 <div id=result></div> 3 <script> 4 function log(message) 5 { 6 document.getElementById("result").innerHTML += message + "<br>"; 7 } 8 9 applicationCache.onchecking = function() { log("checking"); } 10 applicationCache.ondownloading = function() { log("downloading") } 11 applicationCache.onprogress = function() { log("progress") } 12 applicationCache.onupdateready = function() { log("updateready") } 13 applicationCache.onobsolete = function() { log("obsolete") } 14 applicationCache.oncached = function() { log("cached"); loaded(); } 15 applicationCache.onnoupdate = function() { log("noupdate"); loaded(); } 16 applicationCache.onerror = function() { log("error"); loaded(); } 17 18 var once = 1; 19 function loaded() 20 { 21 if (once) { 22 once = 0; 23 parent.postMessage("loaded", "*"); 24 } 25 } 26 </script> 27 </html> 28