Closed
Bug 277767
Opened 20 years ago
Closed 18 years ago
parent() of XML object yields undefined but should be null if no parent exists
Categories
(Rhino Graveyard :: E4X, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.6R6
People
(Reporter: martin.honnen, Unassigned)
References
Details
Section 9.1.1 Internal Properties and Methods of the E4X specifications says about the [[Parent]] property: "The value of the [[Parent]] property must be either an XML object or null." The method parent of an XML object maps directly to that internal property as the specifications says: "When the parent method is called on an XML object x, the following step is taken: !!!1. Return x.[[Parent]]" thus I think if an XML object has no parent then Rhino should return null when calling object.parent(). Rhino (Rhino 1.6 release 1 2004 11 30) however returns undefined which is a bug. Test case to be run in the Rhino shell: var xhtml = <html xmlns="http://www.w3.org/1999/xhtml"></html>; 'xhtml.parent() === null: ' + (xhtml.parent() === null) + '\r\n' + 'xhtml.parent() === undefined: ' + (xhtml.parent() === undefined) yields xhtml.parent() === null: false xhtml.parent() === undefined: true but should yield xhtml.parent() === null: true xhtml.parent() === undefined: false
Comment 1•19 years ago
|
||
Reassigning to please_see_bug_288433@eml.cc pending resolution of bug 288433
Assignee: igor.bukanov → please_see_bug_288433
Updated•19 years ago
|
Assignee: please_see_bug_288433 → nobody
Comment 2•18 years ago
|
||
This bug is fixed in the coming DOM-only E4X implementation. See bug
Status: NEW → ASSIGNED
Depends on: 355677
Comment 3•18 years ago
|
||
See bug 355677, I mean (sorry, typo). :)
Comment 4•18 years ago
|
||
See test e4x/XML/13.4.4.11.js section 2. Rhino now passes this test if XMLBeans is not present. See bug 355677.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 5•18 years ago
|
||
Adding target milestone of 1.6R6 based on the date this bug was resolved FIXED.
Target Milestone: --- → 1.6R6
You need to log in
before you can comment on or make changes to this bug.
Description
•