Re: [whatwg/fetch] Should request's origin be exposed to javascript (#272)

> It would be a little weird though to expose referrer in one place and origin in another.

Referrer can be directly initialized in the Request constructor?  AFAIK, origin cannot be initialized like that.  Its just always going to be "client" after construction, right?

Not sure if its a real problem, but exposing origin would allow script to tell if a Request was ever fetched or not.  Exposing this kind of transient state on the Request seems to muddy its API from a "object that represents a potential network request" to something like "object that represents a potential or maybe already invoked network request".

Incidentally, if a service worker does `fetch(foreignFetchEvent.request)`, does the fetch() use the foreign origin or is it coerced to the service worker's origin somehow?

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/272#issuecomment-205838963

Received on Tuesday, 5 April 2016 14:45:05 UTC