[whatwg] DOMContentLoaded, load and current document readiness

Recently, there was discussion about changing media element state in the
same task that fires the event about the state change so that scripts
that probe the state can make non-racy conclusions about whether a
certain event has fired already.

Currently, there seems to be no correct non-racy way to write code that
probes a document to determine if DOMContentLoaded or load has fired and
runs code immediately if the event of interest has fired or adds a
listener to wait for the event if the event hasn't fired.

Are there compat or other reasons why we couldn't or shouldn't make it
so that the same task that fires DOMContentLoaded changes the readyState
to "interactive" and the same task that fires load changes readyState to
"complete"?

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/

Received on Tuesday, 31 May 2011 02:02:22 UTC