]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/scriptaculous/builder.js
WordPress 3.4
[autoinstalls/wordpress.git] / wp-includes / js / scriptaculous / builder.js
index 953b4a53221321d9c9a2049dca7947eef41894e9..f1f42b9ac6b5073dd5f9b30adc34589f3fc353cb 100644 (file)
@@ -1,6 +1,6 @@
-// script.aculo.us builder.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007
+// script.aculo.us builder.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
 
-// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
 //
 // script.aculo.us is freely distributable under the terms of an MIT-style license.
 // For details, see the script.aculo.us web site: http://script.aculo.us/
@@ -26,7 +26,7 @@ var Builder = {
   //       due to a Firefox bug
   node: function(elementName) {
     elementName = elementName.toUpperCase();
-    
+
     // try innerHTML approach
     var parentTag = this.NODEMAP[elementName] || 'div';
     var parentElement = document.createElement(parentTag);
@@ -34,14 +34,14 @@ var Builder = {
       parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";
     } catch(e) {}
     var element = parentElement.firstChild || null;
-      
+
     // see if browser added wrapping tags
     if(element && (element.tagName.toUpperCase() != elementName))
       element = element.getElementsByTagName(elementName)[0];
-    
+
     // fallback to createElement approach
     if(!element) element = document.createElement(elementName);
-    
+
     // abort if nothing could be created
     if(!element) return;
 
@@ -62,19 +62,19 @@ var Builder = {
             // workaround firefox 1.0.X bug
             if(!element) {
               element = document.createElement(elementName);
-              for(attr in arguments[1]) 
+              for(attr in arguments[1])
                 element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
             }
             if(element.tagName.toUpperCase() != elementName)
               element = parentElement.getElementsByTagName(elementName)[0];
           }
-        } 
+        }
 
     // text, or array of children
     if(arguments[2])
       this._children(element, arguments[2]);
 
-     return element;
+     return $(element);
   },
   _text: function(text) {
      return document.createTextNode(text);
@@ -100,7 +100,7 @@ var Builder = {
     if(typeof children=='object') { // array can hold nodes and text
       children.flatten().each( function(e) {
         if(typeof e=='object')
-          element.appendChild(e)
+          element.appendChild(e);
         else
           if(Builder._isStringOrNumber(e))
             element.appendChild(Builder._text(e));
@@ -117,20 +117,20 @@ var Builder = {
     $(element).update(html.strip());
     return element.down();
   },
-  dump: function(scope) { 
-    if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope 
-  
+  dump: function(scope) {
+    if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope
+
     var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +
       "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +
       "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+
       "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+
       "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+
       "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
-  
-    tags.each( function(tag){ 
-      scope[tag] = function() { 
-        return Builder.node.apply(Builder, [tag].concat($A(arguments)));  
-      } 
+
+    tags.each( function(tag){
+      scope[tag] = function() {
+        return Builder.node.apply(Builder, [tag].concat($A(arguments)));
+      };
     });
   }
-}
+};
\ No newline at end of file