<?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>16571</bug_id>
          
          <creation_ts>2012-03-29 18:01:34 +0000</creation_ts>
          <short_desc>Define order for named properties</short_desc>
          <delta_ts>2012-12-14 15:58:53 +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>All</rep_platform>
          <op_sys>Windows 3.1</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ms2ger">Ms2ger</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>art.barstow</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>mike</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>66243</commentid>
    <comment_count>0</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2012-03-29 18:01:34 +0000</bug_when>
    <thetext>&lt;http://dev.w3.org/2006/webapi/WebIDL/#property-enumeration&gt; has

| If the object supports named properties, then the object’s supported
| property names are enumerated next, in the order given in the
| definition of the set of supported property names.

We don&apos;t give such an order.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66244</commentid>
    <comment_count>1</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2012-03-29 18:03:03 +0000</bug_when>
    <thetext>And I needed a place to stick this: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1438</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80086</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-12-13 10:49:34 +0000</bug_when>
    <thetext>https://github.com/whatwg/dom/commit/e4c52f949bdc3adf53dc0ebd40155fe5de0eced2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80108</commentid>
    <comment_count>3</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-13 16:05:12 +0000</bug_when>
    <thetext>Sorry, what the spec says now is nonsense.  Apart from being very difficult to parse, it at best doesn&apos;t define the order in this simple case:

  &lt;img id=&quot;foo&quot; name=&quot;bar&quot;&gt;

and similar in more complicated cases like:

  &lt;img id=&quot;foo&quot; name=&quot;bar&quot;&gt;
  &lt;img id=&quot;bar&quot; name=&quot;foo&quot;&gt;

and whatnot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80162</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-12-14 08:21:05 +0000</bug_when>
    <thetext>How about this:

The supported property names are in the return value of these steps:

* Let /set/ be an empty list.
* For each element represented by the collection, if any:
  * If the element is a a, applet, area, embed, form, frame, frameset, iframe, img, or object element in the HTML namespace and has a name attribute whose value is not in /set/, append its value to /set/.
  * If the element has an ID and its ID is not in /set/, append ID to /set/.
* Return /set/.

And my apologies for yesterday&apos;s commit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80163</commentid>
    <comment_count>5</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-14 08:32:49 +0000</bug_when>
    <thetext>That&apos;s much better, yeah (and no need to apologize!).

On a slightly unrelated note, the exact set of tagnames involved makes me sad, especially because it doesn&apos;t match the set of things that show up as named properties on the document.  For what it&apos;s worth, Gecko just exposes all names here, and I believe Opera may as well, based on some quick testing.  Is there really a reason to not do that?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80173</commentid>
    <comment_count>6</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-12-14 09:47:49 +0000</bug_when>
    <thetext>Okay, widened to include all elements in the HTML namespace (quick test showed that &lt;svg name=svg&gt; didn&apos;t do anything in either Gecko or Opera).

https://github.com/whatwg/dom/commit/1400a64aff1f2155f9cfa935624b4bfbc4f7c66b</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80183</commentid>
    <comment_count>7</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-14 15:58:53 +0000</bug_when>
    <thetext>Thanks.  I think Gecko is inconsistent about the SVG case: it exposes it as a supported name but does not enumerate it.  The former is probably a bug, though.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>