Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make load event comply with the spec #1416

Closed
jdm opened this issue Dec 15, 2013 · 7 comments
Closed

Make load event comply with the spec #1416

jdm opened this issue Dec 15, 2013 · 7 comments
Labels
A-content/dom Interacting with the DOM from web content

Comments

@jdm
Copy link
Member

jdm commented Dec 15, 2013

http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#the-end

We need the ability to track resource loads that are fired during the initial parse. It likely makes sense to do this in concert with the BrowserContext implementation (#1417).

@jdm
Copy link
Member Author

jdm commented Mar 26, 2014

<jgraham> It would be nice if it worked in such a way that you could always tell what was blocking the load event to help debugging NSL (never stops loading) type bugs

@jdm
Copy link
Member Author

jdm commented Apr 16, 2014

  • Ensure scripts execute in order encountered during parsing
  • Dispatch DOMContentLoaded once scripts have fired
  • Add a load event blocking mechanism to Document
  • Make network loads initiated during parsing block document load (eg. script, link, img)
  • Make subframe loads initiated during parsing block document load (ie. the enclosing document should not be unblocked until the frame has fired its load event)
  • When parsing is complete, check whether the document load is blocked and fire a load event otherwise. If blocked, then only dispatch the load event when no more blockers remain.

@larsbergstrom
Copy link
Contributor

@jdm is there a set of web platform tests that test these features? :-)

@jdm
Copy link
Member Author

jdm commented Apr 21, 2014

Unfortunately the ones that might be applicable seem to involve other unfinished features such as Element.style and inline event handlers (body.onload = ...). We'll probably want to write some simple ones ourselves.

@kmcallister
Copy link
Contributor

This is heavily tied to #1879 (document lifecycle, incl. new HTML parser)

@jdm
Copy link
Member Author

jdm commented Jun 2, 2014

To some degree - I think we can create a separate DocumentLoader object that acts as an interface to the resource task and can be used by the parser and DOM objects.

@jdm jdm added this to the Dogfooding milestone Oct 23, 2014
@jdm jdm removed this from the Dogfooding milestone Jul 19, 2016
@nox
Copy link
Contributor

nox commented Jan 20, 2017

I did this.

@nox nox closed this as completed Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/dom Interacting with the DOM from web content
Projects
None yet
Development

No branches or pull requests

4 participants