Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

baseUri doesn't work if it is relative #65

Closed
wibblymat opened this issue Sep 17, 2015 · 0 comments
Closed

baseUri doesn't work if it is relative #65

wibblymat opened this issue Sep 17, 2015 · 0 comments

Comments

@wibblymat
Copy link
Contributor

The example in the docs is path/to/directory, and the default when document.currentScript is unavailable is ./. But both of these would actually fail to work.

platinum-sw-cache.html#L143 calls the URL constructor with the baseUri as the second parameter but this MUST be an absolute URL.

> new URL('bootstrap/sw-toolbox-setup.js', './')
Uncaught TypeError: Failed to construct 'URL': Invalid URL(…)

We need to do an additional step somewhere to convert any relative baseUri into an absolute one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant