- From: Andres Rios <notifications@github.com>
- Date: Sat, 22 Jul 2017 12:27:06 +0000 (UTC)
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 22 July 2017 12:27:29 UTC
If you've a worker within a ```<link rel="import">``` then its address will be resolved without taking in count CORS.
Let's suppose the following:
_index.html_ (from //localhost)
```html
<!doctype html>
<html>
<head>
<link rel="import" href="//far-away.co/import.html">
</head>
</html>
```
_//far-away.co/import.html_
```html
<!doctype html>
<html>
<head>
<script src="script.js"></script>
</head>
</html>
```
_script.js_
```javascript
'use strict';
new Worker('a-worker.js');
```
I see that browser resolves the _script.js_ from ```//far-away.co/script.js```, but the worker won't resolve as expected. Browser will resolve its address from ```//localhost/a-worker.js``` instead of ```//far-away.co/a-worker.js```.
What the spec states about the worker's URL?
--
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/webcomponents/issues/651
Received on Saturday, 22 July 2017 12:27:29 UTC