Re: [w3c/manifest] Make unbounded navigation scope less broad (#550)

Right with scope declared

```
let resolved = new URL(scope = "deeper", manifest = "https://www.example.com/subdir/manifest.json").href
resolved === "https://www.example.com/subdir/deeper"
```

Without currently be would be unbounded, which means that the within-scope algorithm will return true (for same origin - just filed an issue about that)

Thus scope would become ```"/"```. That is how it is specced currently AFAICT.

My idea was to have the default scope be ```"."``` meaning that it would resolve like this:

```
let resolved = new URL(scope = ".", manifest = "https://www.example.com/subdir/manifest.json").href
resolved === "https://www.example.com/subdir/"
```

Currently scope is never relative to the start_url:

```
new URL(scope = ".", manifest = "https://www.example.com/subdir/manifest.json").href
=> "https://www.example.com/subdir/"
new URL(scope = "deeper", manifest = "https://www.example.com/subdir/manifest.json").href
=> "https://www.example.com/subdir/deeper"
new URL(scope = "/", manifest = "https://www.example.com/subdir/manifest.json").href
=> "https://www.example.com/"
```
so I think it is kind of weird that it suddenly is when undefined, and that that then is the only way to make it.




-- 
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/manifest/issues/550#issuecomment-277752745

Received on Monday, 6 February 2017 17:30:18 UTC