[Bug 19870] [Imports]: Ensure import resources are loaded relative to location of import definition

https://www.w3.org/Bugs/Public/show_bug.cgi?id=19870

Dimitri Glazkov <dglazkov@chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian@hixie.ch

--- Comment #9 from Dimitri Glazkov <dglazkov@chromium.org> ---
Let's try to nail down some specifics.

http://example.com/index.html:
<link rel="import" href="http://randomurl.com/import.html">

http://randomurl.com/import.html:
<html>
<link rel="stylesheet" href="styles/1.css">
<link rel="import" href="2.html">
<script src="scripts/3.js"></script>
<img src="images/4.png">
<template>
   <link rel="stylesheet" href="styles/5.css">
   <img src="images/6.png">
</template>
</html>

What happens to each resource?

* is it fetched and/or executed/processed?
* when accessed via DOM (document.querySelector['link[rel=import]'].import,
what is the resolved URL?

1.css is not fetched, URL is http://randomurl.com/styles/1.css
2.html is fetched and processed, URL http://randomurl.com/2.html
3.js is fetched and executed, URL http://randomurl.com/scripts/3.js
4.png is not fetched, URL http://randomurl.com/images/4.png
5.css is not fetched, URL is empty string
6.png is not fetched, URL is empty string

In other words:
* only scripts and link[rel=import]s fetch resources in an import.
* URLs of all elements with hyperlinks are resolved relative to imported
document.
* at least as spec'd now, template documents don't have a base URL to resolve
against. This means that using the templates from an import will lose the
knowledge of the URL of the imported document in which they had arrived.

Did I miss any other cases? Does anything seem wrong? Factually incorrect?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 19 July 2013 22:09:38 UTC