<?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>26609</bug_id>
          
          <creation_ts>2014-08-19 20:59:15 +0000</creation_ts>
          <short_desc>AttrExodus: investigate child nodes of attributes and attributes being nodes</short_desc>
          <delta_ts>2015-11-11 14:46:05 +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>DOM</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></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne">annevk</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>crimsteam</cc>
    
    <cc>mike</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>philipj</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>110320</commentid>
    <comment_count>0</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-08-19 20:59:15 +0000</bug_when>
    <thetext>As a first step investigate what various browsers support. Then investigate what could be simplified in the model if they dropped support for those features. Then investigate whether those features could be dropped if worthwhile.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110347</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-08-20 11:36:23 +0000</bug_when>
    <thetext>Gecko throws when you attempt to mutate an attribute&apos;s children and acts as if an attribute has no children. E.g. attr.firstChild returns null. attr.appendChild() throws a &quot;HierarchyRequestError&quot;.

Chrome allows mutating attribute children. Inserting a text node modifies both the inserted text node and the text node already present.

IE10 throws just like Gecko. However, it does pretend there is either no child or a single text node child.

Hopefully Chrome can start throwing for mutation. And hopefully it can even emulate Gecko in not exposing any children.

(I&apos;m assuming Safari is the same as Chrome here.)


Now if these methods simply throw, removing them should be possible so there&apos;s still hope for attributes not being nodes I think.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110348</commentid>
    <comment_count>2</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-08-20 11:56:38 +0000</bug_when>
    <thetext>In Gecko, how can you attempt to mutate the children if it has no children?

If we can end up with Attr as a child-free Node type like Text it would be great. Beyond that, is there simplification to be had for making it not a Node at all?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110349</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-08-20 12:48:00 +0000</bug_when>
    <thetext>Well you can attempt to use things like appendChild() and see them fail. 

If they are not nodes they do not have all the concepts associated with nodes: base URL, node document, cloning, adopting, ... Other algorithms do not have to worry about them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115059</commentid>
    <comment_count>4</comment_count>
    <who name="Arkadiusz Michalski (Spirit)">crimsteam</who>
    <bug_when>2014-11-18 15:42:35 +0000</bug_when>
    <thetext>It looks that these old property are often used for attributes:
https://www.chromestatus.com/metrics/feature/timeline/popularity/348

more then Attr.textContent and Attr.ownerElement (which was added to the interface Attr):
https://www.chromestatus.com/metrics/feature/timeline/popularity/349
https://www.chromestatus.com/metrics/feature/timeline/popularity/160</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115078</commentid>
    <comment_count>5</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-11-18 22:15:48 +0000</bug_when>
    <thetext>Given that Attr has no children in Gecko, I guess that Attr.textContent overrides Node.textContent to instead be an alias of value?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115079</commentid>
    <comment_count>6</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-11-18 23:03:18 +0000</bug_when>
    <thetext>Use counters for the access and modification of Attr&apos;s child Text nodes in Blink:
https://codereview.chromium.org/723393005/

If the usage is low, hopefully Blink can align with Gecko as a first step. textContent would need special casing, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115106</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-19 07:51:45 +0000</bug_when>
    <thetext>textContent is already changed in the specification. Am I missing something?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115107</commentid>
    <comment_count>8</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-11-19 08:12:41 +0000</bug_when>
    <thetext>Ah, I didn&apos;t know you&apos;d changed the spec. Ignore me :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118062</commentid>
    <comment_count>9</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-02-21 18:28:06 +0000</bug_when>
    <thetext>Blink bug tracking this:
https://code.google.com/p/chromium/issues/detail?id=305105</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120469</commentid>
    <comment_count>10</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-05-25 20:48:09 +0000</bug_when>
    <thetext>A potential problem was raised on public-html:
https://lists.w3.org/Archives/Public/public-html/2015May/thread.html#msg90

If Attr.cloneNode() is in common use as a workaround for setAttribute() being stricter than the HTML parser, that could complicate the effort to make Attr not inherit from Node.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124174</commentid>
    <comment_count>11</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-11-11 14:46:05 +0000</bug_when>
    <thetext>https://github.com/whatwg/dom/issues/102 covers this fine.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>