diff --git a/browser/base/content/socialchat.xml b/browser/base/content/socialchat.xml index 6ca1d44be29..c485ee20200 100644 --- a/browser/base/content/socialchat.xml +++ b/browser/base/content/socialchat.xml @@ -20,6 +20,37 @@ + + document.getAnonymousElementByAttribute(this, "anonid", "iframe"); @@ -381,51 +412,6 @@ ]]> - - - - - - - - @@ -451,11 +437,16 @@ this.chatboxForURL.delete(aURL); } cb = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "chatbox"); + // _callbacks is a javascript property instead of a as it + // must exist before the (possibly delayed) bindings are created. + cb._callbacks = [aCallback]; + // src also a javascript property; the src attribute is set in the ctor. + cb.src = aURL; if (aMode == "minimized") cb.setAttribute("minimized", "true"); + cb.setAttribute("origin", aProvider.origin); this.insertBefore(cb, this.firstChild); this.selectedChat = cb; - this.initChatBox(cb, aProvider, aURL, aCallback); this.chatboxForURL.set(aURL, Cu.getWeakReference(cb)); this.resize(); ]]>