Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve navigate for service worker hooks
Before this patch, there has been no concept that holds reserved client's 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 an "environment" concept (a supertype object of an environment settings object) that has an id, a creation URL, a target browsing context, and an active service worker such that service workers' FetchEvent handlers can reference this client information before the corresponding environment settings object is actually created. The changes include: - Create an environment (a reserved client) during a navigation; for worker creation requests, create an environment settings object and set the fields correspondingly - Set request's reserved client to the created environment or environment settings object such that fetch (and Handle Fetch) can use it - Set request's target client id such that fetch (and Handle Fetch) can use it Note: The reserved client's active service worker is set, if available, during the fetch (in service worker's Handle Fetch algorithm). Related issue: w3c/ServiceWorker#870 Related change: whatwg/fetch#383
- Loading branch information