This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Service worker's Capture Window Client algorithm (https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#capture-windowclient-algorithm) runs the steps in document.hasFocus() method (https://html.spec.whatwg.org/multipage/interaction.html#dom-document-hasfocus) by directly invoking it. However, this usage seems not desirable as commented by Anne: https://github.com/slightlyoff/ServiceWorker/issues/633 Could you abstract the steps out to a named algorithm which can be invoked from service worker spec?
Jungkee, as far as I can tell the term "hasFocus" and "capture window client" no longer appear in the service workers spec, so I'm closing this. Please let us know if this is still needed!!
You're right. That had been addressed by https://github.com/whatwg/html/pull/308 SW now invokes "has focus steps" as such. Thanks for having closed it!