This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In 7.1.4.1 "Definitions", there's the text: Each task [...] is associated with a Document; if the task was queued in the context of an element, then [...]; if the task was queued in the context of a browsing context, then [...]; if the task was queued by or for a script then [...]. This appears to assume that we can detect when each of those three possibilities holds, but it's not clear how. The only other place in the spec that connects tasks with the phrase "in the context of" is in resource selection algorithm (4.8.10.5), where step (10).10 says: Failed: Queue a task, using the DOM manipulation task source, to fire a simple event named error at the candidate element, in the context of the fetching process that was used to try to obtain candidate's corresponding media resource in the resource fetch algorithm. But: (1) It's unclear whether "in the context of" modifies "Queue a task" or "fire a simple event". (2) Even if it modifies "Queue a task", it says "in the context of the fetching process", which doesn't appear to match any of the three possibilities raised above. [By the way, in the resource selection algorithm, where it says: "Otherwise, the source elements will be used; run these substeps:" that should probably be made a separate step (<li>).]
There's three things here (please file just one per bug in the future!). 1: The stuff about which Document a task is associated with. In practice, I think this is pretty unambiguous. If there's ever a case where you can't work out which it is, please file specific bugs on those. 2: I've no idea what I meant there. Removed everything from "in the context of". 3: Why?
Checked in as WHATWG revision r7896. Check-in comment: Cannot work out what this text was driving at, so... let's remove it... Let me know if you know what it meant. http://html5.org/tools/web-apps-tracker?from=7895&to=7896