<?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>22426</bug_id>
          
          <creation_ts>2013-06-23 13:14:05 +0000</creation_ts>
          <short_desc>[Custom]: attributeChangedCallback should provide name of the attribute</short_desc>
          <delta_ts>2013-07-19 23:11:26 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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>---</target_milestone>
          
          <blocked>14968</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Dominic Cooney">dominicc</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>89729</commentid>
    <comment_count>0</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-06-23 13:14:05 +0000</bug_when>
    <thetext>&quot;when the attribute is modified with setAttribute, setAttributeNS, removeAttribute, or removeAttributeNS methods of the custom element, as well as setting the value property of the custom element&apos;s attribute, the callback must be invoked immediately.&quot;

I think remove (called on the attribute&apos;s value text node) this affects attribute values, (I *think*, but the spec is a little abstract.)

Maybe others.

In Blink textContent, appendChild, etc. affect attribute values. But apparently that is contrary to the DOM spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89843</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-06-25 20:20:14 +0000</bug_when>
    <thetext>I am leaning toward explicitly defining callback-queue-draining points in the spec and using these points universally for all callbacks.

My naive hypothesis is that if we do this right, then if setAttribute() invokes lifecycle callbacks, the only callbacks in the queue would be attributeChanged callback queued by this setAttribute.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89863</commentid>
    <comment_count>2</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-06-26 02:23:27 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; I am leaning toward explicitly defining callback-queue-draining points in
&gt; the spec and using these points universally for all callbacks.

I think this is a bad idea. I am explaining my view on bug 22459. I would love to know what rafaelw thinks about this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90316</commentid>
    <comment_count>3</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-07-04 02:14:22 +0000</bug_when>
    <thetext>There is some discussion of attributes on https://www.w3.org/Bugs/Public/show_bug.cgi?id=22459#c10, #c11, #c12 that probably should be here.

Basically--what is the type of attributeChanged? It looks like this pleases most people:

callback void (DOMString name, DOMString? oldValue, DOMString? newValue)

If an attribute is added, oldValue is null.
If an attribute is removed, newValue is null.
If an attribute is changed, the values of oldValue and newValue are the values of the attribute before and after the change (ie when the callback is queued. Because of callback delivery, what you get from getAttribute may be different.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91030</commentid>
    <comment_count>4</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-07-19 23:11:26 +0000</bug_when>
    <thetext>https://dvcs.w3.org/hg/webcomponents/rev/8d2ad875c8e6</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>