W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2015

[Bug 27874] New: Microtasks and callbacks run from a queued task

From: <bugzilla@jessica.w3.org>
Date: Wed, 21 Jan 2015 12:27:35 +0000
To: public-script-coord@w3.org
Message-ID: <bug-27874-3890@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27874

            Bug ID: 27874
           Summary: Microtasks and callbacks run from a queued task
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebIDL
          Assignee: cam@mcc.id.au
          Reporter: annevk@annevk.nl
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, public-script-coord@w3.org

There's a problem with how we are defining microtasks and callbacks run from a
queued task.

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3379

<!DOCTYPE html>
.<script>
 new MutationObserver(function() { w(2) }).observe(document.body,
{attributes:true})
 document.body.addEventListener("mousemove", function() {
   w(1)
   document.body.setAttribute("test", "x")
 })
 document.body.addEventListener("mousemove", function() {
   w(3)
 })
 document.body.dispatchEvent(new Event("mousemove"))
</script>

The dispatchEvent() method does not queue a task and therefore the order is 1,
3, 2. However, if you move the mouse around in the document the order is 1, 2,
3.

We are not capturing this at all.

Ian suggested IDL needs to invoke HTML's "clean up after running a callback"
from IDL's "Invoking callback functions" section. However, that will not do the
right thing as that would make the order 1, 2, 3 either way.

Related bugs:

* bug 18242
* bug 24403
* bug 25138

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Wednesday, 21 January 2015 12:27:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 21 January 2015 12:27:38 UTC