This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28390 - Which named properties on the Window should be enumerable?
Summary: Which named properties on the Window should be enumerable?
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: https://html.spec.whatwg.org/#named-a...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-01 13:21 UTC by contributor
Modified: 2015-09-01 19:24 UTC (History)
6 users (show)

See Also:


Attachments
Small testcase for this (1.19 KB, text/html)
2015-04-01 13:29 UTC, Boris Zbarsky
Details

Description contributor 2015-04-01 13:21:04 UTC
Specification: https://html.spec.whatwg.org/multipage/browsers.html
Multipage: https://html.spec.whatwg.org/multipage/#named-access-on-the-window-object
Complete: https://html.spec.whatwg.org/#named-access-on-the-window-object
Referrer: 

Comment:
Which named properties on the Window should be enumerable?

Posted from: 98.110.194.132
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:40.0) Gecko/20100101 Firefox/40.0
Comment 1 Boris Zbarsky 2015-04-01 13:28:38 UTC
Window has three different things appearing on it (or more precisely on the named properties object) as named properties:

1)  Frame names.
2)  Element ids.
3)  Element names for some elements.

Right now the spec says these should all be enumerable.  UA behavior seems to be the following:

Chrome: none are enumerable.
Safari: none are enumerable.
IE: Only frame names are enumerable, others are not.
Firefox: Frame names, element names, and _some_ element IDs are enumerable (long
         story in terms of why it ends up this way).

I think we should standarize on either the Chrome/Safari behavior or the IE behavior here, personally.
Comment 2 Boris Zbarsky 2015-04-01 13:29:15 UTC
Created attachment 1591 [details]
Small testcase for this
Comment 3 Boris Zbarsky 2015-04-01 13:42:17 UTC
I just checked, and Firefox used to do what Chrome/Safari do before we started trying to align with the current spec.  

Presto Opera used to do what IE does.

I'm going to switch Firefox to our old behavior for now until this is sorted out for iframes.
Comment 4 Simon Pieters 2015-04-02 08:58:57 UTC
Adrian, are you OK with changing this in IE/Spartan to not enumerate frame names?
Comment 5 Adrian Bateman [MSFT] 2015-04-04 17:24:14 UTC
(In reply to Simon Pieters from comment #4)
> Adrian, are you OK with changing this in IE/Spartan to not enumerate frame
> names?

I checked with Travis on this (cc'd). Given that there's no interop here we'd be okay with changing to the Chrome/Safari behaviour and not enumerating names (with the usual caveat of not knowing when we'd check in this change - it actually turns out to be a reasonable amount of work to remove).
Comment 6 Anne 2015-09-01 12:53:05 UTC
https://github.com/whatwg/html/commit/681f341183cd8e029028f1862c147b25f5e51916

Thank you bz for doing this research.
Comment 7 Travis Leithead [MSFT] 2015-09-01 19:24:42 UTC
Note to self: I filed a bug to track this in Edge (internal VSO4445842).