W3C home > Mailing lists > Public > public-geolocation@w3.org > September 2014

Re: Geofencing alternative proposal

From: John Mellor <johnme@google.com>
Date: Tue, 23 Sep 2014 16:14:34 +0100
Message-ID: <CAG_kaUYbbuvFEgs8N6ggGTkwY2JSX_iVmE7toG+exGcpmJABLA@mail.gmail.com>
To: Martin Thomson <martin.thomson@gmail.com>
Cc: Michael van Ouwerkerk <mvanouwerkerk@google.com>, Marijn Kruisselbrink <mek@google.com>, Alex Russell <slightlyoff@google.com>, "public-geolocation@w3.org" <public-geolocation@w3.org>, Jake Archibald <jaffathecake@gmail.com>
+Jake,Alex who might want to clarify the spec on this point (see this
message
<http://lists.w3.org/Archives/Public/public-geolocation/2014Sep/0024.html>
onwards for context).

No, install is fired when a SW starts being installed. Completing
installation doesn't mean a SW will be used yet.

Once the SW is ready to be activated (in particular, once all tabs using an
old version of the SW have been closed, or the new SW version calls
event.replace()
<https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#install-event-replace-method>
in
its install event to forcibly take over), then an activate event will be
fired (once only), and from then on that SW will receive fetch events etc.

This all happens once only (or only when you update the SW I guess). IIRC
no events are fired when the UA destroys or the script context or reloads
it (by re-executes the SW JS).

On 23 September 2014 15:08, Martin Thomson <martin.thomson@gmail.com> wrote:

> On 23 September 2014 03:31, Michael van Ouwerkerk
> <mvanouwerkerk@google.com> wrote:
> > Martin, I think it means that before functional events (e.g. fetch, push)
> > start firing, activate is fired once. Not once before each fetch event.
> Does
> > that sound right?
>
> That would be perfect, would it not?  Assuming that the script context
> is not destroyed between events unless activate is also fired.
>
Received on Tuesday, 23 September 2014 15:15:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:51:09 UTC