<?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>25467</bug_id>
          
          <creation_ts>2014-04-25 22:30:58 +0000</creation_ts>
          <short_desc>[imports]: Dynanically added imports should block following imports.</short_desc>
          <delta_ts>2014-04-29 23:38:35 +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>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <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>25470</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Morrita Hajime">morrita</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>mike</cc>
    
    <cc>public-webapps</cc>
    
    <cc>sorvell</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>104472</commentid>
    <comment_count>0</comment_count>
    <who name="Morrita Hajime">morrita</who>
    <bug_when>2014-04-25 22:30:58 +0000</bug_when>
    <thetext>Currently dynamically added imports behaves as if it is @async applied.
This should change. It should block following imports, in terms of script execution.

For example:
----
&lt;link rel=import href=a.html&gt;
&lt;script&gt;
var currentDocument = document.currentScript.ownerDocument;
var b = currentDocument.createElement(&quot;link&quot;);
b.rel = &quot;import&quot;;
b.href = &quot;b.html&quot;;
currentDocument.appendChild(b);
var c = currentDocument.createElement(&quot;link&quot;);
c.rel = &quot;import&quot;;
c.href = &quot;c.html&quot;;
currentDocument.appendChild(c);
&lt;/script&gt;
&lt;link rel=import href=d.html&gt;
----

In this case, scripts in imports should be executed in order of [a.html, b.html, c.html, d.html]
instead of current [a.html, (probably)d.html, (b or c).html, (b or c).html].

What&apos;s the motivation?

We need this because in some case we want to dynamically load a set of imports has dependency in it. For example we might want to lazily load plugin-base.html and plugin-hmm.html, where plugin-hmm.html depends on plugin-base.html.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104476</commentid>
    <comment_count>1</comment_count>
    <who name="Morrita Hajime">morrita</who>
    <bug_when>2014-04-25 23:00:11 +0000</bug_when>
    <thetext>Hmm. Actually, the spec doesn&apos;t say anything about dynamically-added node.
This is probably what is already written.

Will keep this open for a while so that people can share their opinions if there are, then close.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104477</commentid>
    <comment_count>2</comment_count>
    <who name="Morrita Hajime">morrita</who>
    <bug_when>2014-04-25 23:01:33 +0000</bug_when>
    <thetext>Note that this makes sense as we now have explicit @async and we can
use it anytime we want. There is no need for this ugly workaround.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104761</commentid>
    <comment_count>3</comment_count>
    <who name="Morrita Hajime">morrita</who>
    <bug_when>2014-04-29 23:38:35 +0000</bug_when>
    <thetext>This is how spec is written.
Blink implementation is just wrong and have to be fixed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>