From e794aa43d7977aa58a7ef8704ac212008e0280e9 Mon Sep 17 00:00:00 2001 From: "Simon B @piratpartiet" Date: Wed, 21 Apr 2010 10:55:30 +0200 Subject: Fix IFRAME bug. Closes #70 --- infrastructure/ace/www/ace2_outer.js | 3 ++- infrastructure/ace/www/domline.js | 2 +- infrastructure/ace/www/linestylefilter.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'infrastructure/ace/www') diff --git a/infrastructure/ace/www/ace2_outer.js b/infrastructure/ace/www/ace2_outer.js index e6d430d..212c159 100644 --- a/infrastructure/ace/www/ace2_outer.js +++ b/infrastructure/ace/www/ace2_outer.js @@ -168,7 +168,7 @@ function Ace2Editor() { var iframeHTML = ["'"+doctype+"'"]; - top.plugins.callHook( + plugins.callHook( "aceInitInnerdocbodyHead", {iframeHTML:iframeHTML}); // these lines must conform to a specific format because they are passed by the build script: @@ -203,6 +203,7 @@ function Ace2Editor() { '\x3cscript>', outerScript, '\x3c/script>', '
x
']; + var outerFrame = document.createElement("IFRAME"); outerFrame.frameBorder = 0; // for IE info.frame = outerFrame; diff --git a/infrastructure/ace/www/domline.js b/infrastructure/ace/www/domline.js index 90e9943..016e868 100644 --- a/infrastructure/ace/www/domline.js +++ b/infrastructure/ace/www/domline.js @@ -101,7 +101,7 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument) { var extraOpenTags = ""; var extraCloseTags = ""; - (function () { try { return top.plugins; } catch (e) { return plugins; }; })().callHook( + parent.parent.plugins.callHook( "aceCreateDomLine", {domline:domline, cls:cls} ).map(function (modifier) { cls = modifier.cls; diff --git a/infrastructure/ace/www/linestylefilter.js b/infrastructure/ace/www/linestylefilter.js index c163120..341345e 100644 --- a/infrastructure/ace/www/linestylefilter.js +++ b/infrastructure/ace/www/linestylefilter.js @@ -238,7 +238,7 @@ linestylefilter.textAndClassFuncSplitter = function(func, splitPointsOpt) { linestylefilter.getFilterStack = function(lineText, textAndClassFunc, browser) { var func = linestylefilter.getURLFilter(lineText, textAndClassFunc); - var hookFilters = (function () { try { return top.plugins; } catch (e) { return plugins; }; })().callHook( + var hookFilters = parent.parent.plugins.callHook( "aceGetFilterStack", {linestylefilter:linestylefilter, browser:browser}); hookFilters.map(function (hookFilter) { func = hookFilter(lineText, func); -- cgit v1.2.3-1-g7c22