<?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>24178</bug_id>
          
          <creation_ts>2013-12-29 23:57:40 +0000</creation_ts>
          <short_desc>[Custom]: No way to differentiate attribute namespaces in attributeChanged callback</short_desc>
          <delta_ts>2015-07-06 08:05:11 +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>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc>http://www.w3.org/TR/custom-elements/#types-of-callbacks</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="Philip Rogers">pdr</reporter>
          <assigned_to name="Dominic Cooney">dominicc</assigned_to>
          <cc>annevk</cc>
    
    <cc>bugs</cc>
    
    <cc>dglazkov</cc>
    
    <cc>jackalmage</cc>
    
    <cc>mike</cc>
    
    <cc>pdr</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>97885</commentid>
    <comment_count>0</comment_count>
    <who name="Philip Rogers">pdr</who>
    <bug_when>2013-12-29 23:57:40 +0000</bug_when>
    <thetext>Some valid html attributes have namespaces:
http://www.w3.org/html/wg/drafts/html/master/single-page.html#attributes-0

Because the attributeChanged callback does not specify the attribute&apos;s namespace, it&apos;s not possible to differentiate the following:
xuse.setAttributeNS(&apos;http://www.w3.org/1999/xlink&apos;, &apos;href&apos;, &apos;foo&apos;)
or
xuse.setAttribute(&apos;xlink:href&apos;, &apos;foo&apos;)
and
xuse.setAttribute(&apos;href&apos;, &apos;foo&apos;)

One way to fix this may be to just add an optional 4th argument to the attributeChanged callback for the namespace if it is not html.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97886</commentid>
    <comment_count>1</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2013-12-30 01:38:06 +0000</bug_when>
    <thetext>(In reply to Philip Rogers from comment #0)
&gt; One way to fix this may be to just add an optional 4th argument to the
&gt; attributeChanged callback for the namespace if it is not html.

If it&apos;s not null; xuse.setAttribute(&quot;href&quot;, &quot;foo&quot;) sets the &quot;href&quot; attribute in the null namespace.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97974</commentid>
    <comment_count>2</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2014-01-03 19:38:21 +0000</bug_when>
    <thetext>Note that SVG is dropping all of its extra namespaces in SVG2, so we can likely just ignore this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98670</commentid>
    <comment_count>3</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2014-01-17 00:17:28 +0000</bug_when>
    <thetext>(In reply to Tab Atkins Jr. from comment #2)
&gt; Note that SVG is dropping all of its extra namespaces in SVG2, so we can
&gt; likely just ignore this.

I would &lt;3 that. Philip?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98671</commentid>
    <comment_count>4</comment_count>
    <who name="Philip Rogers">pdr</who>
    <bug_when>2014-01-17 00:24:41 +0000</bug_when>
    <thetext>(In reply to Dimitri Glazkov from comment #3)
&gt; (In reply to Tab Atkins Jr. from comment #2)
&gt; &gt; Note that SVG is dropping all of its extra namespaces in SVG2, so we can
&gt; &gt; likely just ignore this.
&gt; 
&gt; I would &lt;3 that. Philip?

I would &lt;3 that too. I&apos;ve suggested this to the SVG2 WG at http://lists.w3.org/Archives/Public/www-svg/2014Jan/0018.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100132</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-02-10 11:30:01 +0000</bug_when>
    <thetext>Should this callback not be aligned with mutation observers? We decided to allow for namespaces explicitly there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100180</commentid>
    <comment_count>6</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2014-02-10 17:40:57 +0000</bug_when>
    <thetext>(In reply to Anne from comment #5)
&gt; Should this callback not be aligned with mutation observers? We decided to
&gt; allow for namespaces explicitly there.

I guess this depends on whether we want to keep truly namespaced attributes in HTML, or deprecate them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100191</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-02-10 19:31:58 +0000</bug_when>
    <thetext>Well, unless we are removing setAttributeNS(), we&apos;ll have to deal somehow. But I guess I could see us not supporting that for custom elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105491</commentid>
    <comment_count>8</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2014-05-08 21:48:01 +0000</bug_when>
    <thetext>(In reply to Anne from comment #7)
&gt; Well, unless we are removing setAttributeNS(), we&apos;ll have to deal somehow.
&gt; But I guess I could see us not supporting that for custom elements.

Here&apos;s one idea: https://github.com/dglazkov/webcomponents/pull/2

WDYT?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105699</commentid>
    <comment_count>9</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-05-12 09:22:41 +0000</bug_when>
    <thetext>It&apos;s close, but you actually want to queue for attribute&apos;s local name and namespace, not it&apos;s name and namespace. That would align with what we do for mutation observers and is the actual data you need to deal with namespaced attributes properly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105738</commentid>
    <comment_count>10</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2014-05-12 18:26:00 +0000</bug_when>
    <thetext>(In reply to Anne from comment #9)
&gt; It&apos;s close, but you actually want to queue for attribute&apos;s local name and
&gt; namespace, not it&apos;s name and namespace. That would align with what we do for
&gt; mutation observers and is the actual data you need to deal with namespaced
&gt; attributes properly.

https://github.com/w3c/webcomponents/pull/13 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116786</commentid>
    <comment_count>11</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-01-05 10:59:28 +0000</bug_when>
    <thetext>Seems this was fixed, no?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121643</commentid>
    <comment_count>12</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-07-06 08:05:11 +0000</bug_when>
    <thetext>Moved to https://github.com/w3c/webcomponents/issues/168</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>