Fix 57140: JS strict warnings in commonDialog.js. patch by Mark Olson. r=blake sr=alecf

This commit is contained in:
blakeross%telocity.com 2001-01-17 00:20:25 +00:00
Родитель 2169ed89b5
Коммит da5ed3220c
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -34,8 +34,9 @@ function commonDialogOnLoad()
var messageText = gCommonDialogParam.GetString(0); var messageText = gCommonDialogParam.GetString(0);
var messageParent = document.getElementById("info.box"); var messageParent = document.getElementById("info.box");
var messageParagraphs = messageText.split("\n"); var messageParagraphs = messageText.split("\n");
var i;
for (var i = 0; i < messageParagraphs.length; i++) { for (i = 0; i < messageParagraphs.length; i++) {
var htmlNode = document.createElement("html"); var htmlNode = document.createElement("html");
//htmlNode.setAttribute("style", "max-width: 45em;"); //htmlNode.setAttribute("style", "max-width: 45em;");
var text = document.createTextNode(messageParagraphs[i]); var text = document.createTextNode(messageParagraphs[i]);
@ -148,7 +149,7 @@ function commonDialogOnLoad()
var focusList = ["dialog.loginname", "dialog.password1", "dialog.password2", "ok", var focusList = ["dialog.loginname", "dialog.password1", "dialog.password2", "ok",
"cancel", "Button2", "Button3"] "cancel", "Button2", "Button3"]
for (var i = 0; i < visibilityList.length; i++) { for (i = 0; i < visibilityList.length; i++) {
if (isVisible(visibilityList[i])) { if (isVisible(visibilityList[i])) {
document.getElementById(focusList[i]).focus(); document.getElementById(focusList[i]).focus();
break; break;