<?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>25319</bug_id>
          
          <creation_ts>2014-04-10 23:18:35 +0000</creation_ts>
          <short_desc>[imports]: Want some kind of imperative API</short_desc>
          <delta_ts>2015-07-06 08:06:37 +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>MOVED</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>23278</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Morrita Hajime">morrita</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>dominik</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
    
    <cc>riskable</cc>
    
    <cc>travil</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103718</commentid>
    <comment_count>0</comment_count>
    <who name="Morrita Hajime">morrita</who>
    <bug_when>2014-04-10 23:18:35 +0000</bug_when>
    <thetext>It would be nice to have a set of imperative API to

- load import dynamically
- list loaded imports</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111171</commentid>
    <comment_count>1</comment_count>
    <who name="Dan McDougall">riskable</who>
    <bug_when>2014-09-08 14:57:42 +0000</bug_when>
    <thetext>I just wanted to add that this will be a very important feature for applications that wish to cache web components in browser storage (e.g. IndexedDB) or load web components via a WebSocket connection.  It also allows for making changes to web components (say, changing the element name or inserting additional stylesheets) before they get loaded which would be a killer feature.

My Use Case:

Personally, I just need a mechanism that would allow me to load a web component via a WebSocket without requiring a separate GET request.  My application (Gate One) gets embedded into other web pages directly (no iframe) and it loads/synchronizes all of its assets (JS, CSS, and now HTML templates) over a single WebSocket connection.  It caches assets via IndexedDB (with localStorage fallback) and only re-downloads them when a file gets changed on the server.  That asset synchronization works incredibly well:  It&apos;s much faster than individual GET requests and more flexible and efficient than concatenation.  However, there&apos;s no way for me to take advantage of web components (currently) using that same mechanism.  If I could download a web component over the WebSocket and load it into the page somehow that would solve the problem.

Even if I could provide a data::URI as the &apos;href&apos; attribute to a link tag that would work.  I&apos;d just create the data::URI from the cached web component on-the-fly so the inefficiency of base64 encoding would be moot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119577</commentid>
    <comment_count>2</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2015-04-16 20:00:56 +0000</bug_when>
    <thetext>Rough sketch:

Promise&lt;Document&gt; importDocument(DOMString url);

Different from XHR due to processing of subresources in the context of the current global.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121657</commentid>
    <comment_count>3</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-07-06 08:06:37 +0000</bug_when>
    <thetext>Moved to https://github.com/w3c/webcomponents/issues/141</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>