From 7c86e298058422dcafc068c204fb4a3998f29174 Mon Sep 17 00:00:00 2001 From: Tobie Langel Date: Fri, 4 Jan 2008 23:56:27 +0000 Subject: [PATCH] prototype: Optimize property detection of outerHTML. Avoids triggering FOUC in Safari 3.0.4. Closes #10702. --- CHANGELOG | 2 ++ src/dom.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 56700ef..b74c5b8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Optimize property detection of outerHTML. Avoids triggering FOUC in Safari 3.0.4. Closes #10702. [subimage, Tobie Langel] + * Add document.loaded, a boolean that is set to true once dom:loaded is fired. Setting document.loaded to true before the document is loaded prevents dom:loaded from being fired. [Tobie Langel] * Make Element#insert standard-compliant. Fixes an issue in FF3b2 when inserting HTML or text inside DOM nodes which aren't (yet) appended to the document. [Tobie Langel] diff --git a/src/dom.js b/src/dom.js index 840886f..fabc504 100644 --- a/src/dom.js +++ b/src/dom.js @@ -918,7 +918,7 @@ if (Prototype.Browser.IE || Prototype.Browser.Opera) { }; } -if (document.createElement('div').outerHTML) { +if ('outerHTML' in document.createElement('div')) { Element.Methods.replace = function(element, content) { element = $(element);