<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>24810</bug_id>
          
          <creation_ts>2014-02-25 18:57:03 +0000</creation_ts>
          <short_desc>&quot;invoke MutationObserver object&quot; should be updated for microtasks</short_desc>
          <delta_ts>2014-04-23 15:38:31 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>rafaelw</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101368</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-02-25 18:57:03 +0000</bug_when>
    <thetext>http://dom.spec.whatwg.org/#mutation-observers

See bug 22296. Mutation observers should now queue a &quot;compound microtask&quot;, and each time they call a callback, they should &quot;execute a compound microtask subtask&quot; to run the steps that invoke the callback. (This microtask might end up interrupted and queued on the main event loop, letting the compound microtask immediately continue.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102536</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-03-18 09:17:33 +0000</bug_when>
    <thetext>*** Bug 24725 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102538</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-03-18 09:37:42 +0000</bug_when>
    <thetext>I&apos;m not sure I&apos;m fully following the new world order.

http://dom.spec.whatwg.org/#concept-mo-invoke is all I have right now. It seems the substeps of step 2 can be wrapped in a &quot;execute a compound microtask subtask&quot; to do those steps. 

I guess each time a mutation record is added to a record queue I could check a global flag to see if a compound microtask is already queued and if not, add a compound microtask to the queue that&apos;ll invoke &quot;concept-mo-invoke&quot; and add a step 4 to &quot;concept-mo-invoke&quot; to clear this new flag, but I&apos;m not a 100% sure that will do the right thing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102594</commentid>
    <comment_count>3</comment_count>
    <who name="Rafael Weinstein">rafaelw</who>
    <bug_when>2014-03-18 18:35:12 +0000</bug_when>
    <thetext>That&apos;s close to what blink actually does, except that clearing the flag is step 0, rather than step 4, and step 3 just goes away.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102601</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-03-18 19:18:20 +0000</bug_when>
    <thetext>I see. 3 goes away because at that point you&apos;d have a new compound microtask scheduled. Okay, I think I got it now. I will fix this tomorrow hopefully.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102627</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-03-19 11:31:02 +0000</bug_when>
    <thetext>https://github.com/whatwg/dom/commit/d8b0057ca0dabb961d9d8435fba5e0b5544946d8

Back to you, Ian.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102710</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-03-20 21:02:35 +0000</bug_when>
    <thetext>&lt;annevk&gt; scripting environment is no longer a thing DOM has now or needs HTML to define so you can remove that
&lt;annevk&gt; and under microtask checkpoint there&apos;s a bit of cleanup you can do</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104281</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-04-23 15:38:31 +0000</bug_when>
    <thetext>r8577 http://html5.org/r/8577</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>