bug 240655, port neil's fix from 133606 to toolkit
git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_20040515_BRANCH@157235 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -75,8 +75,8 @@
|
||||
observe : function(aObject) { this.console.appendItem(aObject); }
|
||||
};
|
||||
|
||||
this.mConsoleRowBox = this.getAnonElByAttr("role", "console-rows");
|
||||
this.mStrBundle = this.getAnonElByAttr("role", "string-bundle");
|
||||
this.mConsoleRowBox = document.getAnonymousElementByAttribute(this, "role", "console-rows");
|
||||
this.mStrBundle = document.getAnonymousElementByAttribute(this, "role", "string-bundle");
|
||||
|
||||
try {
|
||||
var isupports = Components.classes['@mozilla.org/consoleservice;1'].getService();
|
||||
@@ -251,24 +251,6 @@
|
||||
|
||||
<!-- UTILITY FUNCTIONS -->
|
||||
|
||||
<!-- We need this method only because document.getAnonymousElementByAttribute
|
||||
is crashing (as of 2/26/2001) -->
|
||||
<method name="getAnonElByAttr">
|
||||
<parameter name="aAttr"/>
|
||||
<parameter name="aVal"/>
|
||||
<body><![CDATA[
|
||||
var kids = document.getAnonymousNodes(this);
|
||||
for (var i = 0; i < kids.length; ++i) {
|
||||
if (kids[i].getAttribute(aAttr) == aVal)
|
||||
return kids[i];
|
||||
var kids2 = kids[i].getElementsByAttribute(aAttr, aVal);
|
||||
if (kids2.length > 0)
|
||||
return kids2[0];
|
||||
}
|
||||
return null;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="repeatChar">
|
||||
<parameter name="aChar"/>
|
||||
<parameter name="aCol"/>
|
||||
|
||||
Reference in New Issue
Block a user