Implement a DocumentLoader type that tracks pending loads and notifie…
72932f9
…s the script task when the queue is empty. Replace the current DOM load event with DOMContentLoaded and dispatch the real load event based on the DocumentLoader's notification.