blob: 478860146dcecb174bfb4b59d6c9db8d05315a01 [file] [log] [blame]
<!DOCTYPE html>
<title>Service Workers: oncontrollerchange</title>
<link rel="help" href="">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
`navigator.serviceWorker.oncontrollerchange` is the [event handler][1] that
must be supported as attribute by the `[ServiceWorkerContainer][2]` object. A
`controllerchange` event using the `[Event][3]` interface is dispatched on
`[ServiceWorkerContainer][2]` object (See step 7 of the [_Activation
algorithm][4]) when the associated Service Worker [registration][5] for the
document enters the [activation process][6]. When the [activation process][6]
is triggered by `replace()` method call within the event handler of the
`install` event, `navigator.serviceWorker.controller` immediately reflects the
[active worker][7] as the Service Worker that [controls][8] the document.
[2]: #service-worker-container-interface
[4]: #activation-algorithm
[5]: #registration
[6]: #activation-process
[7]: #active-worker
[8]: #document-control
test(function() {
// not_implemented();
}, "There are no tests for section oncontrollerchange so far.");