[Bug 23526] New: [imports]: blocking DOMContentLoaded while HTML imports are loaded

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

            Bug ID: 23526
           Summary: [imports]: blocking DOMContentLoaded while HTML
                    imports are loaded
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Component Model
          Assignee: dglazkov@chromium.org
          Reporter: sigmund@google.com
        QA Contact: public-webapps-bugzilla@w3.org
            Blocks: 20683

Should HTML imports block the DOM content loaded event?

The imports spec says that HTML imports block script tags. Script tags block
the DOM content loaded event. So, I made an intuitive leap and thought that,
even if I have no script tags on my main HTML document, an import would block
that event as well.

I couldn't find anything about it in the spec, and playing with the native
implementation I prove myself wrong. However, I was wondering if we should
change that.

Here is a simple example:

index.html:
<html>
<script>
  console.log('1');
  window.addEventListener('DOMContentLoaded',
      function () { console.log('2'); });
</script>
<link rel="import" href="other.html">
     <!-- <script> // this is not empty </script> -->

other.html:
<script>
  console.log('3');
  window.addEventListener('DOMContentLoaded',
      function () { console.log('4'); });
</script>

Loading index.html will print 1, 2, 3; but commenting out the last line in
index.html changes the code to print 1, 3, 2, 4.

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

Received on Tuesday, 15 October 2013 16:51:04 UTC