ModuleDeclarationInstantiation behaviour after failure

Domenic Denicola d at
Wed Jul 20 16:06:44 UTC 2016

From: es-discuss [mailto:es-discuss-bounces at] On Behalf Of Jon Coppeard

> OK, so calling EnqueueJob with a TopLevelModuleEvaluationJob is how this is
> supposed to happen.
> That doesn't give an indication of whether the job succeeded though (except
> for the fact that it would call HostReportErrors some time later).  Is it possible
> to to find out whether this was successful without relying on
> implementation-specific behaviour?

It's already been discussed elsewhere how the ES job formalism is not sufficient for HTML. There are plans to refactor it which have previously reached agreement but nobody has taken the time to implement them. (Part of the refactoring was already done, by moving a lot of the job machinery into ES's RunJobs, which HTML explicitly states user agents must never use.)

In the meantime, what we can do (and are doing, in the current spec) is just copying the steps of TopLevelModuleEvaluationJob into HTML's script execution machinery. That allows us to detect failures.

More information about the es-discuss mailing list