Bug 380422 - The evaluating iframe may contain nuts (and other remainders)

p=Simon Bunzli <zeniko@gmail.com>
r=gavin, sr=neil@parkwaycc


git-svn-id: svn://10.0.0.236/trunk@226342 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
asqueella%gmail.com
2007-05-13 11:36:50 +00:00
parent 24a8bb92ad
commit f0e63dfe95
2 changed files with 6 additions and 4 deletions

View File

@@ -106,8 +106,9 @@ function onEvalKeyPress(aEvent)
function evaluateTypein()
{
var code = gTextBoxEval.value;
var iframe = document.getElementById("Evaluator");
iframe.contentDocument.location = "javascript: " + encodeURIComponent(code);
var evaluator = document.getElementById("Evaluator").contentWindow;
evaluator.location = "about:blank"; // reset the iframe
evaluator.location = "javascript: " + encodeURIComponent(code);
}
function displayResult()

View File

@@ -134,8 +134,9 @@ function onEvalKeyPress(aEvent)
function evaluateTypein()
{
var code = document.getElementById("TextboxEval").value;
var iframe = document.getElementById("Evaluator");
iframe.contentDocument.location = "javascript: " + encodeURIComponent(code);
var evaluator = document.getElementById("Evaluator").contentWindow;
evaluator.location = "about:blank"; // reset the iframe
evaluator.location = "javascript: " + encodeURIComponent(code);
}
function displayResult()