Open Bug 691611 Opened 14 years ago Updated 3 years ago

firstChild.value doesn't seem to work properly when firstChild is a textnode.

Categories

(Core :: General, defect)

7 Branch
x86
Windows Vista
defect

Tracking

()

UNCONFIRMED

People

(Reporter: carljohanf, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.0; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Build ID: 20110928134238 Steps to reproduce: I recently installed latest version of firefox (7.01) And it told me when running my code that nodeValue, nodeName and getAttributeNodeNS() was deprecated i'm not even using the later one so I don't know why it came up. So I changed this code: var XMLPath = g.localTemplatesXML.getElementsByTagName('xml')[0]; XMLPath = XMLPath.firstChild.nodeValue; To this code: var XMLPath = g.localTemplatesXML.getElementsByTagName('xml')[0]; XMLPath = XMLPath.firstChild.value; where firstChild is a text node loaded from a file into a DOM-structure by an Ajax-page-loading-function. (It's working perfectly with .nodeValue) textnode looks something like this: <xml>something/xml/somefile.xml</xml> Actual results: XMLPath becomes undefined Expected results: XMLPath should contain the information inside the textnode as it does with nodeValue.
(In reply to carljohanf from comment #0) > And it told me when > running my code that nodeValue, nodeName and getAttributeNodeNS() was > deprecated i'm not even using the later one so I don't know why it came up. Those properties aren't deprecated, maybe you misunderstood. What's the message exactly?
Could you attach a file having this code so we can see the message, or is there an URL where we can test this?
Dup of bug 674437?
Depends on: 674437
Maybe i missunderstand.. It says something like: nodeName in attribute is deprecated use name instead.. nodeValue in attribute is deprecated use value instead.. What does that mean?
no idea, not my faculty. Moving to "Core"
Product: Firefox → Core
QA Contact: general → general
It means you're using Attribute nodes. E.g. doing element.attributes[0].nodeName. If you're using XPath, then XPath itself might be doing that.
No longer depends on: 674437
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.