Skip to content

Commit

Permalink
Improve navigate for service worker hooks
Browse files Browse the repository at this point in the history
Before this patch, we didn't have a concept that holds information
referenced from a service worker during a navigation (more precisely
before the actual global object and its relevant environment settings
object for the resulting resource is created).

This patch defines "set up a reserved environment settings object"
that temporarily holds the reserved id, the origin, the creation URL
and the target browsing context information such that service workers'
FetchEvent hanlder can reference this client before it's actually
created.

The changes include:
 - Add "set up a reserved environment settings object"
 - Set request's reserved client such that fetch (and Handle Fetch)
 can use it
 - Add Window object's active worker internal slot
 - Add WorkerGlobalObject's active worker internal slot
 - Add "match service worker registration" logic to attach controller

Related issue: w3c/ServiceWorker#870
Call flow: w3c/ServiceWorker#870 (comment)
Expected behavior: w3c/ServiceWorker#870 (comment)
Related changes:
 - SW (WIP):
 - Fetch:
  • Loading branch information
jungkees committed Sep 13, 2016
1 parent 126ec9e commit df5262b
Showing 1 changed file with 265 additions and 219 deletions.
Loading

0 comments on commit df5262b

Please sign in to comment.