tenfourfox/b2g/components/test/mochitest/app/wait_for_update.html
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

26 lines
497 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Test app for bug 1171917</title>
<script type="application/javascript;version=1.7">
function update() {
alert("UPDATE");
}
function onLoad() {
navigator.serviceWorker.getRegistration(".").then(function(swr) {
swr.onupdatefound = function() {
swr.onupdatefound = null;
parent.postMessage({status: "callback", data: "done"}, "*");
};
update();
});
}
</script>
</head>
<body onload="onLoad()">
</body>
</html>