Bug 238898: Allow evaluating the same expression multiple times from the error console, patch by Simon Bünzli <zeniko@gmail.com>, r=me, sr=neil

This commit is contained in:
gavin@gavinsharp.com 2007-05-11 11:33:42 -07:00
parent 0c9df0a662
commit 82f29ae35c
8 changed files with 4 additions and 12 deletions

View File

@ -1 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title></title></head><body></body></html>

View File

@ -107,7 +107,7 @@ function evaluateTypein()
{
var code = gTextBoxEval.value;
var iframe = document.getElementById("Evaluator");
iframe.setAttribute("src", "javascript: " + encodeURIComponent(code));
iframe.contentDocument.location = "javascript: " + encodeURIComponent(code);
}
function displayResult()
@ -118,8 +118,6 @@ function displayResult()
if (result)
gConsole.mCService.logStringMessage(result);
// or could use appendMessage which doesn't persist
var iframe = document.getElementById("Evaluator");
iframe.setAttribute("src", "chrome://global/content/blank.html");
}
// XXX DEBUG

View File

@ -129,6 +129,6 @@
<vbox id="ConsoleBox" class="console-box" flex="1" context="ConsoleContext" persist="sortOrder"/>
<iframe name="Evaluator" id="Evaluator" collapsed="true" src="chrome://global/content/blank.html"/>
<iframe name="Evaluator" id="Evaluator" collapsed="true"/>
</window>

View File

@ -3,4 +3,3 @@ toolkit.jar:
*+ content/global/console.xul (content/console.xul)
+ content/global/console.css (content/console.css)
+ content/global/consoleBindings.xml (content/consoleBindings.xml)
content/global/blank.html (content/blank.html)

View File

@ -1 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title></title></head><body></body></html>

View File

@ -135,7 +135,7 @@ function evaluateTypein()
{
var code = document.getElementById("TextboxEval").value;
var iframe = document.getElementById("Evaluator");
iframe.setAttribute("src", "javascript: " + code);
iframe.contentDocument.location = "javascript: " + encodeURIComponent(code);
}
function displayResult()
@ -146,8 +146,6 @@ function displayResult()
if (result)
gConsole.mCService.logStringMessage(result);
// or could use appendMessage which doesn't persist
var iframe = document.getElementById("Evaluator");
iframe.setAttribute("src", "chrome://global/content/blank.html");
}
/* :::::::: Command Controller for the Window ::::::::::::::: */

View File

@ -171,7 +171,7 @@
<vbox id="ConsoleBox" class="console-box" flex="1" context="ConsoleContext" persist="sortOrder"/>
<iframe name="Evaluator" id="Evaluator" collapsed="true" src="chrome://global/content/blank.html"/>
<iframe name="Evaluator" id="Evaluator" collapsed="true"/>
</window>

View File

@ -25,7 +25,6 @@ en-US.jar:
locale/en-US/cookie/cookieAcceptDialog.dtd (/toolkit/locales/en-US/chrome/cookie/cookieAcceptDialog.dtd)
toolkit.jar:
content/global/blank.html (console/resources/content/blank.html)
content/global/console.js (console/resources/content/console.js)
content/global/console.xul (console/resources/content/console.xul)
content/global/console.css (console/resources/content/console.css)