This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28090 - Request for making the steps in document.hasFocus method invokable from other spec
Summary: Request for making the steps in document.hasFocus method invokable from other...
Status: RESOLVED WORKSFORME
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard: [good first bug]
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-24 11:57 UTC by Jungkee Song
Modified: 2016-01-24 19:01 UTC (History)
3 users (show)

See Also:


Attachments

Description Jungkee Song 2015-02-24 11:57:22 UTC
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?
Comment 1 Domenic Denicola 2016-01-24 05:42:46 UTC
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!!
Comment 2 Jungkee Song 2016-01-24 19:01:58 UTC
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!