2 <title>Service Worker: frame for getRegistrations()
</title>
4 var scope
= 'scope-for-getregistrations';
5 var script
= 'empty-worker.js';
9 self
.onmessage = function(e
) {
10 if (e
.data
== 'register') {
12 port
.onmessage = function(e
) {
13 if (e
.data
== 'unregister') {
14 registration
.unregister()
16 port
.postMessage('unregistered');
22 // Frame registers a registration scoped
23 // (origin)/serviceworker/resources/scope-for-getregistrations
24 navigator
.serviceWorker
.register(script
, { scope
: scope
})
27 e
.ports
[0].postMessage('registered');