Closed Bug 410720 Opened 18 years ago Closed 18 years ago

Javascript document.evaluate isn't working with alerts.

Categories

(Core :: General, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: hope.johan, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2) Gecko/2007121120 Firefox/3.0b2 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2) Gecko/2007121120 Firefox/3.0b2 When excecutiting the following Javascript code, no alert shows up. And it doesn't throw any errors either: alert( document.evaluate('//option', document, null, XPathResult.ANY_TYPE, DOMObject) ); Reproducible: Always Steps to Reproduce: 1. Create a script with contents: alert( document.evaluate('//option', document, null, XPathResult.ANY_TYPE, DOMObject) ); Actual Results: No alert or error. Expected Results: Alert or at least a kind of error.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
This bug is NOT FIXED. -> UNCO
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Component: Error Console → General
Product: Firefox → Core
QA Contact: error.console → general
Version: unspecified → Trunk
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b3pre) Gecko/2008010204 Minefield/3.0b3pre Works fine for me if I replace |DOMObject| with |document.body|. I get an alert saying [object XPathResult].
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2007122605 Minefield/3.0b3pre javascript:alert( document.evaluate('//option', document, null, XPathResult.ANY_TYPE,DOMObject) ); Error: DOMObject is not defined Source file: javascript:alert(%20document.evaluate('//option',%20document,%20null,%20XPathResult.ANY_TYPE,DOMObject)%20); Line: 1 javascript:alert( document.evaluate('//option', document, null, XPathResult.ANY_TYPE,document.body) ); I get an alert saying [object XPathResult] So working as designed.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.