User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:184.108.40.206) Gecko/20070309 Firefox/220.127.116.11 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:18.104.22.168) Gecko/20070309 Firefox/22.214.171.124 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
Last Resolved: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.