Re: [w3c/ServiceWorker] Proposal: FetchEvent.navigationLoadType (#1167)

Just bikeshedding here (sorry), but I wonder if something like this would be any better:

```
interface Request {
  readonly attribute RequestTrigger trigger;
};

enum RequestTrigger {
  "default",
  "reload",
  "back",
  "forward"
};
```

Then it can be combined with the other fields to determine what happened:

```
r.mode === 'navigate' && r.trigger === 'reload'
```

Non-subresource requests would always have a default trigger for now.

If chrome/firefox actually implemented `.type` and `.destination` then script could also distinguish between what kind of subresource load it is.

Or since no one has implemented `.type` and `.destination` we could try to fit the triggering information into there as well.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1167#issuecomment-315092961

Received on Thursday, 13 July 2017 14:23:47 UTC