Bugzilla@Mozilla – Bug 451037
document.loadBindingDocument() returns a document that does not have a script handling object
Last modified: 2008-10-29 10:09:22 PDT
Summon comment box
This is similar to bug 448548. This is fx2-only. On fx2, document.loadBindingDocument() returns a document that does not have a script handling object. (On trunk and fx3.0.x, it does not return anything.)
I guess this is for me
There are possibly ways to get this to work in FF3 as well. It's harder to get a reference to the binding document, but it might still be possible. I don't think we intentionally try to prevent it.
Created attachment 334347 [details] [review] simplest possible hack This is ugly, but the whole method is. Fortunately the API has changed on 1.9.
Perhaps for non-chrome (non-cached) xbl documents, the scripthandlingobject could be the same as what the bound document has.
(In reply to comment #3) > There are possibly ways to get this to work in FF3 as well. It's harder to get > a reference to the binding document, but it might still be possible. I don't > think we intentionally try to prevent it. Perhaps disabling event handling on all loaded xbl documents would make sense.
Either of comment 5 or comment 6 makes sense to me. 6 might be a good idea for other reasons, as I doubt we expects events to happen in there.
I like comment 6 to.
Created attachment 334556 [details] [review] for 1.8
Created attachment 334558 [details] [review] for trunk
Created attachment 334561 [details] [review] for 1.9.0
I'm not sure if DisableEventHandling is the right name for the method, since it doesn't prevent running those deprecated event type specific listeners (nsIFocusListener etc.). Such listeners can be implemented only in C++.
Created attachment 335026 [details] [review] for trunk
Created attachment 335027 [details] [review] for 1.9.0
Created attachment 335028 [details] [review] for 1.8
Comment on attachment 335027 [details] [review] for 1.9.0 Approved for 1.9.0.2, a=dveditz for release-drivers.
Comment on attachment 335028 [details] [review] for 1.8 Approved for 1.8.1.17, a=dveditz for release-drivers.
Verified FIXED; I can reproduce using Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16, but not Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080829 Firefox/2.0.0.17, with the testcase in comment 1. Replacing fixed1.8.1.17 with verified1.8.1.17.
Comment on attachment 335028 [details] [review] for 1.8 a=asac for 1.8.0.15