Open Bug 996612 Opened 10 years ago Updated 2 years ago

Problems enumerating properties of window.location

Categories

(Core :: DOM: Core & HTML, defect, P5)

28 Branch
x86_64
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: vkhomyackov, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36

Steps to reproduce:

http://jsfiddle.net/LTCpB/2/

I was checking for existence of specific properties of window.location in different browsers.


Actual results:

The only way to enumerate properties of window.location in Firefox is `for .. in` loop. `Object.keys` etc. don't work as expected.


Expected results:

- `Object.keys` should return the same set of keys as `for .. in`.
- `JSON.stringify` should return string with location's properties.
- `Object.getOwnPropertyNames` should work.
Component: Untriaged → DOM
Product: Firefox → Core
Bug 832014 will fix this.  Note that this is only because Location is an unforgeable interface; in general for DOM objects Object.keys() will NOT see the same set of keys as for..in.
Depends on: 832014
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.