<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>21229</bug_id>
          
          <creation_ts>2013-03-09 00:16:02 +0000</creation_ts>
          <short_desc>[Imports]: Imports should fetch and process some external resources</short_desc>
          <delta_ts>2013-09-18 19:47:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>23170</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>20683</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Scott Miles">sjmiles</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>dominicc</cc>
    
    <cc>ian</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>84154</commentid>
    <comment_count>0</comment_count>
    <who name="Scott Miles">sjmiles</who>
    <bug_when>2013-03-09 00:16:02 +0000</bug_when>
    <thetext>We have straw version of this loader that allows construction like this:

web-component.html:

  &lt;script src=&quot;one.js&quot;&gt;&lt;/script&gt;
  &lt;link rel=&quot;component&quot; href=&quot;two.html&quot;&gt;
  &lt;element name=&quot;three&quot;&gt;
  ...
  &lt;/element&gt;
  &lt;link rel=&quot;component&quot; href=&quot;four.html&quot;&gt;
  &lt;script src=&quot;five.js&quot;&gt;&lt;/script&gt;
  &lt;element name=&quot;six&quot;&gt;
  ... 
  &lt;/element&gt;

Ideally the contract is that the script tags are live (executed in main window context), and that each of these things is processed in order.

As in the example, &apos;one.js&apos; must be processed before &apos;two.html&apos;, and so on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84155</commentid>
    <comment_count>1</comment_count>
    <who name="Scott Miles">sjmiles</who>
    <bug_when>2013-03-09 00:17:40 +0000</bug_when>
    <thetext>I forgot to mention that all paths are intended to be relative to the url of the linked component document itself, but I believe that&apos;s already in the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85077</commentid>
    <comment_count>2</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-03-28 05:06:08 +0000</bug_when>
    <thetext>It seems odd to permit external scripts but not inline scripts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85083</commentid>
    <comment_count>3</comment_count>
    <who name="Scott Miles">sjmiles</who>
    <bug_when>2013-03-28 07:50:03 +0000</bug_when>
    <thetext>I agree. I didn&apos;t include it my example, but fwiw our polyfill evaluates inline scripts also.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90996</commentid>
    <comment_count>4</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-07-19 17:31:02 +0000</bug_when>
    <thetext>What about other resources?

I guess this depends on understanding what exactly does including a &lt;link rel=stylesheet&gt; or &lt;img src&gt; (or &lt;frame srd&gt;) in an import mean.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91023</commentid>
    <comment_count>5</comment_count>
    <who name="Scott Miles">sjmiles</who>
    <bug_when>2013-07-19 22:36:10 +0000</bug_when>
    <thetext>We use the following rules:

&gt;&gt; &lt;link rel=stylesheet&gt; 

applied as if it was in the main document

&gt;&gt; &lt;img src&gt; 

inert

&gt;&gt; &lt;iframe src&gt;)

inert</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91026</commentid>
    <comment_count>6</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-07-19 22:47:46 +0000</bug_when>
    <thetext>Do you need to keep things that are inert in the document? Ian had an idea today that we introduce a new insertion mode in HTML parser that simply throws away everything that isn&apos;t relevant in an import document.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91027</commentid>
    <comment_count>7</comment_count>
    <who name="Scott Miles">sjmiles</who>
    <bug_when>2013-07-19 22:49:59 +0000</bug_when>
    <thetext>IMO, the expectation is that those nodes are available for manual transplantation into the main document.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91028</commentid>
    <comment_count>8</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-07-19 22:56:44 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; IMO, the expectation is that those nodes are available for manual
&gt; transplantation into the main document.

So it&apos;s okay if the relative URLs in these elements will be messed up when you move them into main documents? This is the way it works now when you move an element from one doc to another.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91029</commentid>
    <comment_count>9</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-07-19 23:04:30 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; IMO, the expectation is that those nodes are available for manual
&gt; transplantation into the main document.

Another thought: can we not just let the authors put these into a template on the imported document?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93526</commentid>
    <comment_count>10</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-09-18 19:47:03 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 23170 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>