Closed
Bug 533139
Opened 15 years ago
Closed 12 years ago
JSON.stringify(window.navigator) doesn't follow the spec
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: oliver, Unassigned)
Details
Attachments
(1 file)
480 bytes,
text/html
|
Details |
I noticed a bug in mozilla while working on a webkit bug, JSON stringification of the navigator object doesn't match the spec. JSON.stringify(window.navigator) produces '{}' Technically it should throw an exception due to the Plugin->MimeType->Plugin cycle, but even if that was prevented the navigator object has string properties, etc which should appear in the output. Honestly I have no idea what's actually being done here -- is navigator being special cased? or is their a general idiom mozilla applies to serialising dom objects?
Comment 1•15 years ago
|
||
What's happening here is that the properties of Mozilla's window.navigator are from the prototype and so they are excluded. It's basically what's happening in the attached test case. I'm not sure if any spec defines from whence navigator's properties should come.
Comment 2•15 years ago
|
||
I guess the attachment title "Testcase" is a bit deceiving in this case...
Comment 3•12 years ago
|
||
This is a WebKit bug.
Assignee: general → nobody
Status: NEW → RESOLVED
Closed: 12 years ago
Component: JavaScript Engine → DOM
QA Contact: general → general
Resolution: --- → INVALID
Comment 4•12 years ago
|
||
> I'm not sure if any spec defines from whence navigator's properties should come.
At this point, WebIDL does, and they come from the prototype.
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•