<?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>22600</bug_id>
          
          <creation_ts>2013-07-08 22:16:43 +0000</creation_ts>
          <short_desc>Need a way to make navigator.plugins supported named properties not enumerable</short_desc>
          <delta_ts>2014-04-11 19:04:34 +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>
          
          <blocked>22320</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-script-coord</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>90432</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-07-08 22:16:43 +0000</bug_when>
    <thetext>If I do this I get &quot;true&quot;, &quot;true&quot;:

   alert(0 in navigator.plugins);
   alert(&apos;Google Talk Plugin&apos; in navigator.plugins);
   

If I do this I get &quot;true&quot;, &quot;false&quot;:

   var names = {};
   for (i in navigator.plugins)
     names[i] = true;
   alert(0 in names);
   alert(&apos;Google Talk Plugin&apos; in names);


With this I get &quot;true&quot;, &quot;false&quot; (&quot;true&quot;, &quot;true&quot; in Gecko, but that seems bogus given the other results):

   alert(navigator.plugins.propertyIsEnumerable(0))
   alert(navigator.plugins.propertyIsEnumerable(&apos;Google Talk Plugin&apos;))


I don&apos;t see a way to do this in WebIDL. For now I&apos;ve just said &quot;The properties exposed in this way must not be enumerable&quot;.

TESTCASE: http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2397

(Note that Firefox doesn&apos;t act consistently here. It seems like it makes properties enumerable once you&apos;ve tried to see if they&apos;re there? But try running the examples above in isolation and you&apos;ll see the difference. Or run the middle part of the test before the other two parts.) (I couldn&apos;t test IE.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90449</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-07-09 03:31:54 +0000</bug_when>
    <thetext>&gt; It seems like it makes properties enumerable once you&apos;ve tried to see if
&gt; they&apos;re there?

It creates the properties when you try to see if they&apos;re there, and creates them as enumerable.  Just trying to enumerate does _not_ create the properties.  That&apos;s a bug.

That bug is being fixed in https://bugzilla.mozilla.org/show_bug.cgi?id=855611 which will in fact make both the name and the index enumerable, per current WebIDL spec.

&gt; For now I&apos;ve just said &quot;The properties exposed in this way must not be
&gt; enumerable&quot;.

Unfortunately, that directly contradicts normative requirements WebIDL has here; we will be tracking WebIDL unless and until it gets changed (simply because all the code in question is autogenerated in our WebIDL bindings, so has no choice but to track WebIDL).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90450</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-07-09 03:34:37 +0000</bug_when>
    <thetext>But note that we want a feature like this for &lt;form&gt; anyway, for bug 22320.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90514</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-07-09 20:27:38 +0000</bug_when>
    <thetext>Other browsers don&apos;t enumerate the names them either. Given that this API only exists for back-compat, being different just because WebIDL doesn&apos;t have a way to do this doesn&apos;t seem like a good idea.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99109</commentid>
    <comment_count>4</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2014-01-26 17:17:14 +0000</bug_when>
    <thetext>You can link to the term #dfn-unenumerable now:

https://github.com/heycam/webidl/commit/de52ca39d9513511c5eca7c030ec040035ad3f86</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99117</commentid>
    <comment_count>5</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-01-27 01:32:57 +0000</bug_when>
    <thetext>I wonder whether we should use this for htmlcollection too... people seem to get confused by the current enumeration behavior there.  :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102210</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-03-11 17:02:37 +0000</bug_when>
    <thetext>Taking this to deal with the implications on my side.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103774</commentid>
    <comment_count>7</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-04-11 19:04:34 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8571.
Check-in comment: Sync with WebIDL over &apos;unenumerable&apos;.
http://html5.org/tools/web-apps-tracker?from=8570&amp;to=8571</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>