Re: [ServiceWorker] Default scope to register() (#595)

One thing to clarify is whether we'd want to use script url (rather than the page url) as the base url to parse all the given scope urls (i.e. not only the default scope url). I'd assume so because otherwise we'll have to special case the default value "./" which might confuse authors.

For example, we'd want the following output without the special casing the default value, right?
```js
// example.com/foo/page.html
var sw = navigator.serviceWorker;
sw.register("bar/sw.js"); // scope == "/foo/bar/"
sw.register("bar/sw.js", { scope: "./" }); // scope == "/foo/bar/" (not "/foo/")
sw.register("bar/sw.js", { scope: "baz/" }); // scope == "/foo/bar/baz/" (not "/foo/baz/")
```

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/595#issuecomment-68234021

Received on Monday, 29 December 2014 05:52:20 UTC