Closed
Bug 378891
Opened 17 years ago
Closed 15 years ago
dispatchEvent on XMLDocument fails with NS_ERROR_FAILURE
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: fcp2007, Unassigned)
Details
Attachments
(1 file)
378 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 If you create an XMLDocument, create a custom event and dispatch the event on the XMLDocument, dispatchEvent throws an exception NS_ERROR_FAILURE. See the attached example. This happens no matter whether the document has a "chrome:" URL or not. This does not happen if you use window.document instead of the XMLDocument created by script. Reproducible: Always Steps to Reproduce: 1. Open attachment. Actual Results: Nothing happens. The Console^2 extension shows: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMEventTarget.dispatchEvent] Expected Results: Two alert boxes should appear, one saying "testevent" and the other "Completed."
Naturally you can work around this issue by maintaining event listeners on the custom event by yourself and avoiding using dispatchEvent.
This WFM in Fx 3.0 and higher. Likely due to bug 412567, but I can't prove it.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•