W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

[Bug 22600] New: Need a way to make navigator.plugins supported named properties not enumerable

From: <bugzilla@jessica.w3.org>
Date: Mon, 08 Jul 2013 22:16:43 +0000
To: public-script-coord@w3.org
Message-ID: <bug-22600-3890@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22600

            Bug ID: 22600
           Summary: Need a way to make navigator.plugins supported named
                    properties not enumerable
    Classification: Unclassified
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebIDL
          Assignee: cam@mcc.id.au
          Reporter: ian@hixie.ch
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, public-script-coord@w3.org

If I do this I get "true", "true":

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


If I do this I get "true", "false":

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


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

   alert(navigator.plugins.propertyIsEnumerable(0))
   alert(navigator.plugins.propertyIsEnumerable('Google Talk Plugin'))


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

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

(Note that Firefox doesn't act consistently here. It seems like it makes
properties enumerable once you've tried to see if they're there? But try
running the examples above in isolation and you'll see the difference. Or run
the middle part of the test before the other two parts.) (I couldn't test IE.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Monday, 8 July 2013 22:16:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:50 UTC