Bug 228527 JS Warnings in editor

r=neil sr=bz
This commit is contained in:
timeless%mozdev.org 2003-12-21 04:04:33 +00:00
parent 677239bba1
commit 9bf18d89e0
3 changed files with 8 additions and 7 deletions

View File

@ -741,7 +741,7 @@ var nsPublishAsCommand =
FinishHTMLSource();
window.ok = false;
publishData = {};
var publishData = {};
var oldTitle = GetDocumentTitle();
window.openDialog("chrome://editor/content/EditorPublish.xul","_blank",
"chrome,close,titlebar,modal", "", "", publishData);

View File

@ -366,7 +366,7 @@ var gEditorDocumentObserver =
if (!editor && editorStatus == nsIEditingSession.eEditorOK)
{
dump("\n ****** NO EDITOR BUT NO EDITOR ERROR REPORTED ******* \n\n");
editorStatus = nsIEditingSession.eEditorErrorUnkown;
editorStatus = nsIEditingSession.eEditorErrorUnknown;
}
switch (editorStatus)
@ -377,7 +377,7 @@ var gEditorDocumentObserver =
case nsIEditingSession.eEditorErrorCantEditMimeType:
errorStringId = "CantEditMimeTypeMsg";
break;
case nsIEditingSession.eEditorErrorUnkown:
case nsIEditingSession.eEditorErrorUnknown:
errorStringId = "CantEditDocumentMsg";
break;
// Note that for "eEditorErrorFileNotFound,
@ -2026,7 +2026,7 @@ function UpdateWindowTitle()
SaveRecentFilesPrefs();
}
// Set window title with " - Composer" appended
xulWin = document.documentElement;
var xulWin = document.documentElement;
window.title = windowTitle + xulWin.getAttribute("titlemenuseparator") +
xulWin.getAttribute("titlemodifier");
} catch (e) { dump(e); }
@ -3373,8 +3373,9 @@ function FillInHTMLTooltip(tooltip)
{
const XLinkNS = "http://www.w3.org/1999/xlink";
var tooltipText = null;
var node;
if (gEditorDisplayMode == kDisplayModePreview) {
for (var node = document.tooltipNode; node; node = node.parentNode) {
for (node = document.tooltipNode; node; node = node.parentNode) {
if (node.nodeType == Node.ELEMENT_NODE) {
tooltipText = node.getAttributeNS(XLinkNS, "title");
if (tooltipText && /\S/.test(tooltipText)) {
@ -3389,7 +3390,7 @@ function FillInHTMLTooltip(tooltip)
}
}
} else {
for (var node = document.tooltipNode; node; node = node.parentNode) {
for (node = document.tooltipNode; node; node = node.parentNode) {
if (node instanceof Components.interfaces.nsIDOMHTMLImageElement ||
node instanceof Components.interfaces.nsIDOMHTMLInputElement)
tooltipText = node.getAttribute("src");

View File

@ -332,7 +332,7 @@ function AddTreeItem ( name, value, treeChildrenId, attArray )
// but suppress calling the onSelect handler
gDoOnSelectTree = false;
try {
selectTreeItem(treeChildren, item);
selectTreeItem(treeChildren, treeitem);
} catch (e) {}
gDoOnSelectTree = true;