The "initialization" steps for Web browsers

Ian Hickson ian at
Tue Jun 10 19:53:30 PDT 2014

On Wed, 11 Jun 2014, Domenic Denicola wrote:
> From: Ian Hickson [mailto:ian at] 
> > 
> > Where in the ES spec are the ES jobs for promises queued up?
> and 
> search for `EnqueueTask("PromiseTasks"`.

EnqueueTask() step 7 is where the HTML spec would hook in and treat 
different jobs as ending up in different task queues. Presumably, if we 
want all promise resolutions to be treated as microtasks, then that step 
would be overridden to queue a microtask when queueName = 'PromiseTasks', 
and queue a regular task otherwise (or whatever the other queues need), 
where that task/microtask would trigger the NextTask magic to run the 
actual job.

(As far as I can tell, in an HTML implementation the only queue name that 
is used is "PromiseTasks" currently, so maybe EnqueueTask() step 7 would 
just always queue a microtask. The only other queue name used in the ES 
spec currently is "ScriptTasks", but that one is never called in a browser 
environment, according to the discussion in the other fork of this 
thread, where I was talking about this with Allen.)

Ian Hickson               U+1047E                )\._.,--....,'``.    fL       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the es-discuss mailing list