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

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

--- Comment #5 from Morrita Hajime <morrita@google.com> ---
On second thought, I found that this should be rather handled by load event
instead of DOMContentLoaded event. That is because:

- Imports can be nested and have unpredictable delay, that is not what
  users of DOMClientLoaded expect. <script defer> is counter example of this,
  but I think it is mainly for compatibility reason - Script has been expected
  to be loaded before the parser ends.
- HTML standard has a hook for load event [1] but doesn't have one for
DOMContentLoaded. It is not expected to be extensible and the load event is
more generic extension point. 

We might want an event for signaling import readiness, or we could use some
promise based API for waiting the readiness, that is proposed at Bug 25007.

I landed the change that employs the |load| hook and eliminating a monkey patch
for waiting DOMContentLoaded [2]. Less of monkey patch indicates that this is
saner way to go.

[1]
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#the-end
[2]
https://github.com/w3c/webcomponents/commit/b5ca1fbf683f8c7bbc0ff6b097476b18f1e25e22

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

Received on Tuesday, 15 April 2014 00:55:40 UTC