blob: f6d1eb382f8d8eafe229795ca3d35125ce25b2dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<!DOCTYPE html>
<!-- Load the image here to put it in the image cache -->
<img src="image-20px.png">
<script>
function ok(v, msg) {
window.parent.postMessage({status: "ok", result: !!v, message: msg}, "*");
}
function done(reg) {
ok(reg.active, "The active worker should be available.");
window.parent.postMessage({status: "registrationdone"}, "*");
}
navigator.serviceWorker.ready.then(done);
navigator.serviceWorker.register("imagecache_test.js", {scope: "."});
</script>
|