Bug 319656: Toolkit code assumes document.firstChild is the root element, patch by Jason Barnabe (np) <jason_barnabe@fastmail.fm>, r=mconnor

This commit is contained in:
gavin%gavinsharp.com 2006-01-05 10:43:35 +00:00
parent e8caa4ff8d
commit 40e5957f10
2 changed files with 3 additions and 3 deletions

View File

@ -255,7 +255,7 @@ function mailCharsetLoadListener (event)
}
}
var wintype = document.firstChild.getAttribute('windowtype');
var wintype = document.documentElement.getAttribute('windowtype');
if (window && (wintype == "navigator:browser"))
{
var contentArea = window.document.getElementById("appcontent");

View File

@ -72,7 +72,7 @@ function openNewTabWith(href, sourceURL, postData, event)
// As in openNewWindowWith(), we want to pass the charset of the
// current document over to a new tab.
var wintype = document.firstChild.getAttribute('windowtype');
var wintype = document.documentElement.getAttribute('windowtype');
var originCharset;
if (wintype == "navigator:browser")
originCharset = window.content.document.characterSet;
@ -94,7 +94,7 @@ function openNewWindowWith(href, sourceURL, postData)
// set, then extract the current charset menu setting from the current document and use it to
// initialize the new browser window...
var charsetArg = null;
var wintype = document.firstChild.getAttribute('windowtype');
var wintype = document.documentElement.getAttribute('windowtype');
if (wintype == "navigator:browser")
charsetArg = "charset=" + window.content.document.characterSet;