[fusion-commits] r2240 - branches/fusion-2.2/lib

svn_fusion at osgeo.org svn_fusion at osgeo.org
Wed Sep 29 09:57:05 EDT 2010


Author: madair
Date: 2010-09-29 13:57:05 +0000 (Wed, 29 Sep 2010)
New Revision: 2240

Modified:
   branches/fusion-2.2/lib/jxlib.uncompressed.js
Log:
re #408: patch applied to the file jxlib.uncompressed.js

Modified: branches/fusion-2.2/lib/jxlib.uncompressed.js
===================================================================
--- branches/fusion-2.2/lib/jxlib.uncompressed.js	2010-09-28 17:55:17 UTC (rev 2239)
+++ branches/fusion-2.2/lib/jxlib.uncompressed.js	2010-09-29 13:57:05 UTC (rev 2240)
@@ -1405,17 +1405,27 @@
 
 Document.implement({
 
-	newElement: function(tag, props){
-		if (Browser.Engine.trident && props){
-			['name', 'type', 'checked'].each(function(attribute){
-				if (!props[attribute]) return;
-				tag += ' ' + attribute + '="' + props[attribute] + '"';
-				if (attribute != 'checked') delete props[attribute];
-			});
-			tag = '<' + tag + '>';
-		}
-		return $.element(this.createElement(tag)).set(props);
-	},
+        newElement: function(tag, props) {
+            var createdElement;
+            if (Browser.Engine.trident && props) {
+                ['name', 'type', 'checked'].each(function(attribute) {
+                    if (!props[attribute]) return;
+                    tag += ' ' + attribute + '="' + props[attribute] + '"';
+                    if (attribute != 'checked') delete props[attribute];
+                });
+                var replaceTag = '<' + tag + '>';
+                try {
+                    createdElement = this.createElement(replaceTag);
+                }
+                catch (e) {
+                    createdElement = this.createElement(tag);
+                }
+            }
+            else {
+                createdElement = this.createElement(tag);
+            }
+            return $.element(createdElement).set(props);
+        },
 
 	newTextNode: function(text){
 		return this.createTextNode(text);



More information about the fusion-commits mailing list