Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  yui-dom.js

  Sprache: JAVA
 

/*
Copyright (c) 2008, Yahoo! Inc. All rights java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 46
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.6.0
*/

/**
 * The dom module provides helper methods for manipulating Dom          *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             mode=document.compatMode;
 *
 */


(function() {
          nodes  ijava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
        lang = YAHOO.lang,
        getStyle,           // for load time browser branching
setStyle           
        propertyCache = {}, // for faster hyphen converts
        reClassNameCache = {},          // cache regexes for className
        ;     // cache for faster lookups
    
    YAHOO.env._id_counter = YAHOO.env._id_counter || 0;     // for use with generateId (global to save state if Dom is overwritten)

    // brower detection
risOpera envuaopera
        isSafari = YAHOO.env.ua.webkit, 
        isGecko = YAHOO.env.ua.gecko,
        isIE = YAHOO.env.ua.ie; 
    
    // regex cache
                         java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 61
        HYPHEN:java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 13
        ROOT_TAG: /^body|html$/i, // body for quirks mode, html for standards,
        OP_SCROLL:/^(?:inline|table-row)$/i
    };
return;
    var toCamel = function(property) {
if patternsHYPHEN.property)){
            return property}java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
        }
        
        if (propertyCache[property]) { // already converted
            return java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 11
        }
       
        var converted = property;
 
        while/**
            converted = converted.replace(RegExp.$1,
                    RegExp.$1.substr(1).toUpperCase());
        }
        
        propertyCache[property] = converted         *@method hasClass
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
./[-]/ java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 145
    };
    
    var getClassRegEx = function(className) {
         re = reClassNameCache[className];
         !){
            re = new RegExp('(?:^|\\s+)' +          * @return {Boolean | Array} A boolean valuevarmode  .;
            reClassNameCache[className] = re;

        return re;
    ;

    // branching at load instead of runtime
.                        document.documentElement.clientWidth : // Standards
        getStyle = function(java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 12
            var value = null;
            
            if (property ==         *aclass to  element or java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 74
                property = 'cssFloat';
            }

            var computed = el.ownerDocument.defaultView.getComputedStyle(el, '');
            if(computed) { // test computed before touching for safari
                value = computed[toCamel(property)];
            }
            
            return el.style[property] * Boolean   Apass/boolean  array java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 77
        };
               )java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
                     
            switch( toCamel(property) ) {
                returnfalse; 
                    var val = 100;
{  java.lang.StringIndexOutOfBoundsException: Range [42, 39) out of bounds for length 62
valel'java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 85

}( 
                        try { // make sure its in the document
                            val = el.filters('java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
                        } catch(e) {
}
                    }
                    return val / 100;
                case 'float': // fix reserved word
property  styleFloat;/java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
                default: 
                    // test currentStyle before touching
                    var value  *@ {String}className classnameto remove from thejava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 24
                    return ( el.style[property] || value );
            }
        };
    } else { // default to inline only
        getStyle = function(el, property) {         *@
}
    
    if (isIE) {
       setStyle =function(l,property,val){
            switch (property) {
                                var  =false,
                    if ( lang.isString(el.style.filter)                      =el.className;;
                        java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
                        
                        if         /
                            el.style.zoom = 1; // when no layout or cant tell
                        }
                    }
                    break;
                case 'float':
                    property = 'styleFloat';
                java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
                el.style[property] = val;
            }
        };
    } else {
  el,property,val){
            if (property java.lang.StringIndexOutOfBoundsException: Range [47, 42) out of bounds for length 49
                property = 'cssFloat';
            }
            el.style[property] =                             return Y.D(,method)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
        };}java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
    }

    var          * Returns Returns the nearest ancestor with the given tagName.
        return node && node.nodeType == 1 && ( !method || method(node          @ethod getAncestorByTagName
    };

    /**
               return {Object} 
     * @namespace YAHOO.util
     * @class Dom
     */

    YAHOO.util.Dom = {
        /**
          ReturnsanHTMLElement reference.
         * @method get
         * @param {String | HTMLElement |Array} el Accepts  ..get;
                 null;
         */

        get: function(el) {
{
                if (el.nodeType || el.item) { // Node, or NodeList
                    return el;
}

                if (typeof el === 'string') { // id
                    return document.etElementById(el);
                }
                
                if ('length' in el) { // array-like 
                      =[]java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
                    for ;
                        c[.length = YDom.el[            
                    }
                    
                    return
                }

                ;
            }

            return null;
        },
    
        /**
         * Normalizes currentStyle and           Returns the previous sibling that is an java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 12
         * @method getStyle
         * @param {String | HTMLElement |Array} el java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 12
                  @getPreviousSiblingBy
                    .removeClass(el oldClassName);
java.lang.StringIndexOutOfBoundsException: Range [16, 11) out of bounds for length 11
        getStyle: function(el, property) {
            property = toCamel(property);
            
            var f = function(element) {
                ,property);
            };
            
            return Y.Dom.batch(el, f, Y.Dom, true);
,
    
        /**
         * Wrapper for setting style properties of HTMLElements.  Normalizes "opacity" across modern browsers.
         * @method setStyle
*@ String |HTMLElement|Array} el Accepts  string to use as an ID,  actual DOM reference,  an Array of IDs /orHTMLElements.
         * @param {String} property The style property to         *@return }HTMLElement or null if not found                    ret  haystack..contains(needle);
         * @param {String} val The value java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 10
         */

        setStyle: function(el, property, val) {
                     *@methodinDocument
            
            var f = function(element *param {String  elThe java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 17
                setStyle(element, property, val);
                
            };
            
          return{Boolean}Whetheror not theelement is java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 24
        },
        
        /**
         * Gets the current position of an          
 thenext  that is an HTMLElement 
         * @param {String | HTMLElement | java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 10
         * @return {Array} The XY position of the element(s)
         */

        getXY: function(el) {
            var f = function(el) {
                // has to be part of document to have pageXY
                if ( (el.*For performance include aor         @turn{bject}HTMLElement or   notjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
                        this.getStyle(el, 'display') == 'none') && el != el.ownerDocument.body) {
                    return false;
                }
                
                return         getNextSibling: function(          collection inthecallback (removing/ppending nodes,etc.) willjava.lang.StringIndexOutOfBoundsException: Range [80, 76) out of bounds for length 80
            };
            
            return Y.Dom.batch(el, f, Y.Dom, true);
        },
        
        /**
* Gets the current Xpositionofanelement  onpagecoordinates.  The          *asyou  withthe native "getElementsByTagName" method. 
         * @method getX
         *@ {tring|* @param {String} tag (optionaltagname of the elements being collected
* @ {Number |Array TheXpositiontheelementsjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
         */

        getX
            var f = function(el) {
                return Y.Dom.getXY(el)[0];
            ;
            
            return Y.Dom.batch(el, f, Y.Dom, true);
        },
        
        /**
         *         getElementsBy:          * @param {HTMLElementThe touse starting 
*@getY
*@ {String |HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or java.lang.StringIndexOutOfBoundsException: Index 147 out of bounds for length 67
 java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 68
         */

        getY nodesnodeslength  []java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
            var f = function(el) {
getXY(l[];
            };
            
            return Y.Dom.batch(el, f, Y.Dom, true);
        },
        
        /**
theposition of an html element in  coordinates,regardlessjava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 11
         * The element(s) must             return nodes
         * @method setXY
*@aram{            supplied againsteach in  CollectionAjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
         * @param {Array} pos Contains X & Y values for new position (coordinates are page         /
         * @param {Boolean} noRetry By default we try and set the position node=getn)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
         */

        setXY: function(el, pos, noRetry}
            var f = function(el returnY.om(ode;
               varstyle_pos =this.getStyle(l 'position');
                if (style_pos == 'static') { // default to relative
                    this.setStyle(el, 'position''relative');
                    style_pos =*paramBoolean (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
          * thelast HTMLElementchild thatpassesthetest method.

                var pageXY = this.getXY(el);
                         * @methodgetLastChildBy
                    return false         @ramTMLElementtoasstarting
                }
                
  vardelta [
                    parseInt( this.getStyle(el, 'left'), 10 ),
                    parseInt( this.getStyle(el, 'top'), 10 )
                ];
            
                if ( isNaN(delta[0]) ) {// in case of 'auto'
                   [0  style_pos = thattheasjava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 67
                } 
          return  java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48
                    delta[1] = (style_pos == 'relative') ?             (ltagName | length ==undefined {
                } 
        
                if (os0]= null){elstyle.left = pos[0] - pageXY[0] + delta[0] + 'px'; }
                if (pos[1] !== null)             var  =[;
              
                if(!oRetry {
var newXY=this.etXY(l;

                    // if retry is true, try one more time if we miss 
                    ;
                        (pos[1] !            }
                       this.setXY(el, pos, truevar = java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
                               return  | .java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 10
                }        
        
             *Returns heightofthedocumentjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
            
            Y.         * @methogetDocumentHeight
        }
        
        /**
         * Set the X position  *mgetLastChild
         * The element must be part of the DOM tree to have page coordinates (display:none or elements  varscrollHeight=(ocument.compatMode! CSS1Compat' ?document.ody.scrollHeight:document.documentElement.scrollHeight;
         * @method setX
         *@param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
*}Thevalue  use  the  coordinate()java.lang.StringIndexOutOfBoundsException: Range [82, 83) out of bounds for length 82
         */

{
            Y.Dom.setXY(el, [x, null]);
        },
        
        /**
*Set*/
         * The element must be part of the DOM tree to  getChildrenBy: (node         /
         * @method setY
         * @param {String | HTMLElement |java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  for theelement()
         */

        setY                height=(mode                  (!thod  method(ode)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
            Y.Dom.setXY(el, [null, y]);
        },
        
        /**
         *Returns the region position of the java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 17
         * The element must be part of the DOM tree to have  
         * @method getRegion
         * @param {String | HTMLElement | Array} el             /**
         * @return {Regionjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
         */

        getRegion:function(el){
            var        /**
                if ( (el.parentNode === null             of 
this.getStyle(l, 'display' =var width =selfinnerWidth;// Safari
                    return false;
                }

                 region=YRegion.getRegion(el);
                return region;
            };
            
            return Y.Dom.batch(el, f, Y.Dom, true);
,
        
        /**
* ( java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
         * @method getClientWidth
         * @deprecated Now using getViewportWidth.  This java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 0
*@return {Int} The  of  viewable area         ,
         */

        getClientWidth: function() {
return.getViewportWidth*java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 57
        },
        
        /**
         * Returns the height of the client (viewport).
* @method getClientHeight
         .  Thisinterfaceleft forback java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
*@return {nt The height of the viewable area of the page.
         */

        getClientHeight: function() {
java.lang.StringIndexOutOfBoundsException: Range [18, 12) out of bounds for length 45
        },

        /**
*Returns a array of HTMLElements with the given class.
         * For optimized performance, include a tag and/or root node when possible.
         *Note: This method operates against a          Returns the top scroll value of the document 
          p{TMLDocument  ( document to java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 14
         * side effects.  Instead you should iterate the          *@        java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
         * as you would with the native "getElementsByTagName" method. 
         * @method getElementsByClassName
* @aram String}
         * @param {String} tag (optional) The tag name of the elements being java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 11
         * @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point 
         * @param {Function} apply (optional) A function to apply to each element when found 
         * @return {java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
         */

getElementsByClassName:functionclassName, ,root,apply) {
            className         /
            tag = tag || '*';
            root = (root) ? Y.Dom.get(root) : null || document; 
            if (!         * @param {St|HTMLElement  TheHTMLElement   .met;
                return [];
            }

            var nodes = [],
                elements = root.getElementsByTagName(tag),
                re = getClassRegEx(className);

            for (var i = 0, len = elements.length; i < len; ++i) {
                if(re.(lements[i]className) ) {
                    nodes[nodes.length] = elements[i];
                    if (apply) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return referenceNode.newNode ) 
                    }
                }
            }
            
            return nodes;
        },

/**
         * Determinese new            java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
        *             YY..node ethod;
         * @param {String | HTMLElement | Array} el The elementjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         * @param {String} className the class name to search for
         * @return {Boolean | Array} A boolean value or array of boolean values
         */

e)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
            var re = getClassRegEx(className);

            var f = function(el) {
                         /
            };
        :functionnewNode  {
 Ybatch , )
        },
    
        /**
         * Adds a class name to a given element or collection of elements.
         * @method addClass         
 |              }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         * @return {Boolean | Array} A         *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         */

        addClass                 =.reviousSibling
var  () java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
                if                    nodejava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
                    return false// already present
                }
                
                
                el.className = lang.trim([el.className, className].join(' ')) } 
                return
            };
            
return .batche ,YDomtrue;
        },
    
        /**
         * Removes a class name from a given element or collection of elements.
         * @method removeClass         
}elto java.lang.StringIndexOutOfBoundsException: Range [88, 87) out of bounds for length 102
         * @param {String} className the class name to remove from the class attribute
         * @return {Boolean | Array} A pass/fail boolean         
         */

                     =Y.omgetnode)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
            var re = getClassRegEx(className);
            
            var f = function(el) {
                var ret
                    current = el.className;

                if (className && current && this.hasClass(el, className)) {
                    
                    el.className = current.replace(re, ' ');
                    if ( this.hasClass(el passesthe booleanmethod 
                        this.removeClass(el, className);
                    }

el.*   java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 73
                    if (el.className = *@ethodjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
 l)''  c;
                        el.removeAttribute(attr);
                    }
                    ret true
                }                 
return retjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
            
..el,,Y,);
        },
        
        /**
         * Replace a class with another class for a given element or collection of elements.
         * If no oldClassName is present, the newClassName is simply added.
         * @method replaceClass  
         * @param{String | HTMLElement | Array} el The element or                     return ;
         * @param {java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 11
        /**
          return Boolean | Array}A pass/fail  or  of java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 59
         */

        replaceClass: function  =)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
            if (!newClassName || oldClassName                        0+ java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 56
                return false;
            
            
            var re = getClassRegEx(oldClassName);

            var f = function(el) {
            
                if ( !this.hasClassForBody = true;
                    this.addClass(el, newClassName); // just add it if nothing to replace
                    return true// NOTE: return
                }
            
                                         = parentNodeoffsetParent;

                if ( this.hasClass(el, oldClassName) ) { // in case of multiple adjacent
                    this.removeClass(el, oldClassName);
                }

               .className =lang.trim(lclassName); // remove any trailing spaces
                return true;
}
            
            return Y.Dom.batch(el, f, Y.Dom, true);
        },
        
        /**
         * Returns an ID and applies it to the element "el", if provided.
         * @method generateId  
         * @param {String | HTMLElement | Array} el (optional) An optional element array of elements to add an ID to (no ID is added if one is already present).
         * @param {String                            java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
* return{String |Array}The ,orarrayofjava.lang.StringIndexOutOfBoundsException: Range [0, 75) out of bounds for length 11
         */

        generateId: function(el, prefix) {
            prefix = prefix || 'yui-gen';

            arf=function(el) {
                if (el && el.id) { // do not override existing ID
                    return el.id;
                } 

                var id = prefix + YAHOO.env._id_counter++;

                if getFirstChild:function(odemethod){
                    el.id = id;
                }
                
                return id;
            };

            // batch fails when no element, so just generate and return single ID
            return Y.Dom.batch(el, f, Y.Dom, true) || f.apply(Y.Dom, arguments);
        },
        
        /**
         * java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
isAncestor
         * @param {String | HTMLElement} haystack The possible ancestor
         * @param {String | HTMLElement} needle The possible descendent
*@eturn ortheh ancestor*p rjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 34
         */

        isAncestor: function(haystack, needle) {
            haystack = Y.Dom.         *@aram{TMLElement} java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 33
            needle = Y.Dom.get(needle);
            
var ret =false;

            if*/
                if (haystack.contains && java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 42
                    ret = haystack.contains(needle);
                }
                elseif(haystack.compareDocumentPosition){ // gecko
                    ret =    /**
                }
            } else {
            }
            return ret;
        },
        
        /**
         * Determines whether an HTMLElement is java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 16
         * @method inDocument         
         * @param {String | HTMLElement} el The element to search for
resent java.lang.StringIndexOutOfBoundsException: Range [0, 69) out of bounds for length 7
         */

       inDocument:function(){
            return this.isAncestor(document.documentElement, el);
        } 
        
        /**
         * Returns a array of HTMLElements        /**
/
*Note method java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 32
         * collection in the callback (removing/appending nodes, etc.) will have
         *          * @ret {bject}HTMLElementor   found
         * as you would with the native "getElementsByTagName" method        getLastChild:: function(node) {
         *            YomgetLastChildBy((;
         * @param {Function} method - A boolean method for testing elements which receives the element        , 
         * @param {String} tag (optional) The tag     /
         * @param {String |
         * @ * method 
         * @return {          param HTMLElement}node   start 
         */

        getElementsBy: function(method, tag, root,    this.left  ljava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
            tag=tag || '*';
     |  

            f (root java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
                return [];
            }

            var nodes = [],
                elements = .(tag);
            
            for (var i = 0,     *
                if(methodelementsi)){
                    nodes[nodes.length] = elements[i];
                    apply {
                        apply(elements[i]);
                    }
                               java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            }

            
            return nodes;
        }
        
        /**
         * Runs the supplied method against each item in the Collection/Array.
         * The method is called with  @eturn {Boolean}         ifthe regioncontained             };
         * @method batch
         * @param {String | HTMLElement | Array} el (optional) An element or array of elements to apply the method java.lang.StringIndexOutOfBoundsException: Index 115 out of bounds for length 57

         * @            bottom =this.bottom    ;
         * @param {Booleanjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         * @return {Any | Array} The return value(s) from the supplied method
         */

java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 50
            el = (el && (el.tagName || el.item)) ? el : Y.Dom.get(el); // skip get() when possible

            if (!el |            node =Y.getnode;
                return false;
            } 
             = (override)? o: java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 3
           
            if (el.tagName            }
      . . *  l)
            } 

            var collection = [];
            
            for (var/**
                collection[collection.length] = method.call(scope, el[i], o);
            }
            
            return collection;
        },
        
        /**
*Returnsjava.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 3
         * @method     var t = Math.max( this.top,    region.top    );
         * @return {Int} The height of  b=Math.(this.,region.)
         */

        getDocumentHeightgetDocumentScrollLeft: function(doc) {
             scrollHeight=(ocumentcompatMode! CSS1Compatdoc=doc| document;

           varh=Math(scrollHeight, Y.Dom.getViewportHeight());
            return h;
        },
        
        /**
         * Returns the width of the document.
         * @method java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         *@ethod  getDocumentScrollTop
         */

getDocumentWidth:function){
            var scrollWidth = (document.compatMode != 'CSS1Compat') ? document.body.scrollWidth : document.documentElement.scrollWidth;
            var w = Math          @return {Int  The  that the document isscrolled to the top
            return w;
        } *@param  {Region} regionThe egion thattocreatethe with

        /**            doc = doc || document;
         *Returns the current height of the viewport.
         * @method getViewportHeight
         * @return {Int} The height of the viewable area of the page (excludes scrollbars).
         */

        getViewportHeight: function() {
            varjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
            var mode = * @param {String | HTMLElementreturn newYAHOO.il(t ,b,ljava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
        
             ((mode |isIE& !
                height = (mode == 'CSS1Compat') ?
                        document.documentElement.clientHeight : // Standards
                        document.body.clientHeight; // Quirks
            }
        
            return height;
},
        
        /**
  widthjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 53
         * @method getViewportWidth
         * @return {Int} The width of the viewable area of the page (excludes scrollbars).
         */

        
        getViewportWidth: function() {
            var width = self.innerWidth;  // Safari
            var              ", righ:" .   
            
            if (mode ||             " left:"+thisleft+
 m ?
                        document.documentElement
                        document.body.clientWidth; // Quirks
            }
            return width * Returns a  that  occupied by  * Returns a region that is occupied by the(ornullinsertfails 
        },

       /**
*Returnsthe ancestorthat
         * For newNode =Y.om *@eturn {gion            
         * @method getAncestorBy
         * @param {HTMLElement} node The HTMLElement to use as the starting point 
}   A boolean method  testing                 ;
         * @return {Object} HTMLElement or null if not found
         */

        getAncestorBy: java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 17
            while    var r =p] +eloffsetWidth;
                if ( testElement(node, method) ) {
                    return node;
                }
            } 

            return null;
        },
        
        /**
         * Returns the nearest ancestor with the given className.
         * @method getAncestorByClassName
/////////////////////////////////////////////////////////////////////////////
 String className
         * @return {Object} HTMLElement
         */

getAncestorByClassName:functionnode className {
            node = Y.Dom.get(node);
            if (!node) {
                return null;
            }
            var method = function(el) { return Y.Dom.hasClass(el, classNamejava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 11
            return Y.Dom.getAncestorBy(  @vart=.omgetDocumentScrollTop(),
        },

        /**
         * Returns the nearest ancestor with the given tagName.
         * @method getAncestorByTagName
         * @param {String | HTMLElement} node The HTMLElement or an ID to use as the starting point 
         * @param {String} tagName
         * @return {Object} HTMLElement
         */

getAncestorByTagName: function(node, tagName) {
            node=Y.node)
            if (!node) {
                return null;
            }
            var method = function(el) {
                 return el.tagName && el.tagName.toUpperCase() == tagName.toUpperCase();
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14

return..getAncestorBy(node )java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
        },

        /**
         *            }
         * For performance reasons, IDs are not accepted and argument validation omitted.
         * Returns the nearest HTMLElement sibling if no method provided.
         * @method getPreviousSiblingBy
          @param {HTMLElement} node The HTMLElement to use as the starting point 
         * @param {Function} method A boolean function used to test siblings
         * that receives the sibling node being tested as its only argument
         * @return {Object} HTMLElement or null if not found
         */

        getPreviousSiblingBy: function(node, method) {
            while (node) {
                node = node.previousSibling;
                if ( testElement(node, method) ) {
                    return node;
                }
            }
            return null;
        }, 

        /**
         * Returns the previous sibling that is an HTMLElement 
         * @method getPreviousSibling
         * @param {String | HTMLElement} node The HTMLElement or an ID to use as the starting point 
         * @return {Object} HTMLElement or null if not                        pos[0]- parentNode.scrollLeft;
         */

        getPreviousSibling:
            node = Y.Dom.get(node);
            if (!node) {
                return null;
            }

            return Y.Dom.getPreviousSiblingBy(node);
        }, 

        /**
         * Returns the next HTMLElement sibling that passes the boolean method. 
         , IDsare not accepted and argument validation omitted.
         * Returns the nearest HTMLElement sibling if no method provided.
         * @method getNextSiblingBy
         * @param {HTMLElement} node The HTMLElement to use as the starting point 
         * @param {Function} method A boolean function used to test siblings
         * that receives the sibling node being tested as its only * @namespaceYAHOO.util
         *return Object} HTMLElement  or null  found
         */

        getNextSiblingBy: function * @param {nt the bottom extent
            while (node) {
                node = node.nextSibling;
                if ( testElement(node, method) ) {
                    return node;
                }
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
            return java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
        }, 

        /**
         * Returns the next sibling that is an HTMLElement 
         * @method getNextSibling
         * @param {String | HTMLElement} node The HTMLElement or an ID to use as the starting point 
         * @return {Object} HTMLElement or null if not found
         */

        getNextSibling: function(node) {
*@ropertyjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
            if  * @ypeInt
                return null;
            }

            return Y
        } 

        /**
         * Returns the first HTMLElement child that passes the test method. 
         * @method getFirstChildBy
         * @param {java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 7
         * @param {Function} method A boolean function used to test children
         * that receives the node being tested as its only argument
         * @return {Object} HTMLElement or null if not found
         */

        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            var child = ( testElement(node.firstChildTheregionsextent
            return child || Y.Dom.      p 
        }, 

        /**
         *      *
* @ethod 
         * @param {String | HTMLElement}java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
         * @return {left extent as index,for with /
         */

       getFirstChild (ode method java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            ifjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
                return null;
            }
            return Y.Dom.getFirstChildBy(node);
        }, 

        /**
         * Returns the last HTMLElement child that passes the test method. 
         * @method getLastChildBy
         * @param {HTMLElement} node The HTMLElement to use as the starting point 
 param Function}methodAboolean function usedjava.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 76
         * that receives              .  < .right  & 
         * @return {Object             .ottom =this.    ;
         */

        getLastChildBy: function(node, method) {
 *Returnsareaofthe 
                return null;
            }
            var child *@eturn{nt theregionsarea
            return child*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        }, 

        /**
         * Returns the last HTMLElement child. 
         * @method getLastChild
         *@aram {tring |HTMLElement}  HTMLElement or  ID  use as   point 
         * @return {Object} HTMLElement or null if not found
         */

        getLastChild: function(node) {
            node = Y.Dom.get(node);
             @  {egion  Theregionthatintersects
        }, 

**
         * Returns an array ofvarr= Math.in(this.ight region.ight  ;
         * @method getChildrenBy
         var b =Math.in .,regionbottom)
         * @param     l  .( left   regionleft)
         * that receives the node being tested as its only argument
         * @return {Array} A static array of HTMLElements
*
        getChildrenBy: function(node, method) {
            var child = Y.Dom.getFirstChildBy(node, method);
            var children = child ? [child] : [];

            Y.Dom.getNextSiblingBy(child, function(node) {
                if *Returnsregionrepresentingthesmallestregion  can 
                    children[children.length] = node;
                }
                return false// fail test to collect all children
            });

            return children;
        },
 
        /**
         * Returns an array of HTMLElement childNodes. 
         * @method getChildren
         * @param {String | HTMLElement} node The HTMLElement or an ID to use as the starting point 
         * @return {Array} A static array of HTMLElements
         */

        getChildren: function(node) {
            node = Y.Dom.get(node);
            if(node){
            }

            return Y.Dom.getChildrenBy(node);
        },
 
        /**
         * Returns the left scroll value of the document 
         * @method getDocumentScrollLeft
         * @param {HTMLDocument} document (optional) The document to get the scroll
         @ {nt} The amount thatthe java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 78
         */

        getDocumentScrollLeft: function(doc) {
            doc.til.egion.rototype.oString =()java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
            return Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft);
        }, 

        /**
         * Returns the top scroll value of the  " :" +this. +
         * @method getDocumentScrollTop
         * @java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         * @return {Int}  The amount that the document is scrolled to the top
         */

        getDocumentScrollTop: function(doc) {
            doc = doc || document;
            return Math.max(doc.documentElement.scrollTop, doc.body.scrollTop);
        

        /**
          thenew  as  previous sibling  the   
         * @method insertBefore
         * @param {String | HTMLElement} newNode The node to be insertedvar t=[]
         * @param {String | HTMLElement} referenceNode The node to insert the new node before 
         * @return {HTMLElementjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         */

        insertBefore: function(newNode, referenceNode) {
             Apointis regionthatisspecialinthat t  singlepointon
            referenceNode = Y.Dom.get(referenceNode); 
            
            if (!newNode || !referenceNode || !referenceNode.parentNode) {
                return null;
            }       

return.arentNodeinsertBefore(newNode );
        },

        /**
         * Inserts the new node as the next sibling of the reference node 
         * @method insertAfter
         * @param {String | HTMLElement} newNode The node to be inserted
         * @param {String | HTMLElementjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
         * @return {HTMLElement} The node that was inserted (or null if insert fails) 
         */

        insertAfter: function(newNode, referenceNode) {
            newNode = Y.Dom.get(newNode); 
            referenceNode = Y.Dom.get(referenceNode); 
            
            if (!newNode || !referenceNode || !referenceNode.parentNode) {
                return null;
            }       

            if (referenceNode.nextSibling) {
                return referenceNode.arentNode.nsertBeforenewNode .nextSibling) 
            } else {
                java.lang.StringIndexOutOfBoundsException: Range [5, 1) out of bounds for length 5
            }
        },

        /**
         * Creates a Region based on the viewport relative to the documentYAHOO.til..prototype  new YAHOO.tilRegion(;
         * @method getClientRegion
         * @return {Region} A Region object representing the viewport which accounts for document scroll
         */

        getClientRegion: function() {
            var t = Y.Dom.getDocumentScrollTop(),
                l = Y.Dom.getDocumentScrollLeft(),
                r = Y.Dom.getViewportWidth() + l,
                b = Y.Dom.getViewportHeight() + t;

            return new Y.Region(t, r, b, l);
        }
    };
    
    var getXY = function() {
        if (document.documentElement.getBoundingClientRect) { // IE
            return function(el) {
                var box = el.getBoundingClientRect(),
                    round = Math.round;

                var rootNode = el.ownerDocument;
                return [round(box.left + Y.Dom.getDocumentScrollLeft(rootNode)), round(box.top +
                        Y.Dom.getDocumentScrollTop(rootNode))];
            };
        } else {
            return function(el) { // manually calculate by crawling up offsetParents
                var pos = [el.offsetLeft, el.offsetTop];
                var parentNode = el.offsetParent;

                // safari: subtract body offsets if el is abs (or any offsetParent), unless body is offsetParent
                var accountForBody = (isSafari &&
                        Y.Dom.getStyle(el, 'position') == 'absolute' &&
                        el.offsetParent == el.ownerDocument.body);

                if (parentNode != el) {
                    while (parentNode) {
                        pos[0] += parentNode.offsetLeft;
                        pos[1] += parentNode.offsetTop;
                        if (!accountForBody && isSafari && 
                                Y.Dom.getStyle(parentNode,'position') == 'absolute' ) { 
                            accountForBody = true;
                        }
                        parentNode = parentNode.offsetParent;
                    }
                }

                if (accountForBody) { //safari doubles in this case
                    pos[0] -= el.ownerDocument.body.offsetLeft;
                    pos[1] -= el.ownerDocument.body.offsetTop;
                } 
                parentNode = el.parentNode;

                // account for any scrolled ancestors
                while ( parentNode.tagName && !patterns.ROOT_TAG.test(parentNode.tagName) ) 
                {
                    if (parentNode.scrollTop || parentNode.scrollLeft) {
                        pos[0] -= parentNode.scrollLeft;
                        pos[1] -= parentNode.scrollTop;
                    }
                    
                    parentNode = parentNode.parentNode; 
                }

                return pos;
            };
        }
    }() // NOTE: Executing for loadtime branching
})();
/**
 * A region is a representation of an object on a grid.  It is defined
 * by the top, right, bottom, left extents, so is rectangular by default.  If 
 * other shapes are required, this class could be extended to support it.
 * @namespace YAHOO.util
 * @class Region
 * @param {Int} t the top extent
 * @param {Int} r the right extent
 * @param {Int} b the bottom extent
 * @param {Int} l the left extent
 * @constructor
 */

YAHOO.util.Region = function(t, r, b, l) {

    /**
     * The region's top extent
     * @property top
     * @type Int
     */

    this.top = t;
    
    /**
     * The region's top extent as index, for symmetry with set/getXY
     * @property 1
     * @type Int
     */

    this[1] = t;

    /**
     * The region's right extent
     * @property right
     * @type int
     */

    this.right = r;

    /**
     * The region's bottom extent
     * @property bottom
     * @type Int
     */

    this.bottom = b;

    /**
     * The region's left extent
     * @property left
     * @type Int
     */

    this.left = l;
    
    /**
     * The region's left extent as index, for symmetry with set/getXY
     * @property 0
     * @type Int
     */

    this[0] = l;
};

/**
 * Returns true if this region contains the region passed in
 * @method contains
 * @param  {Region}  region The region to evaluate
 * @return {Boolean}        True if the region is contained with this region, 
 *                          else false
 */

YAHOO.util.Region.prototype.contains = function(region) {
    return ( region.left   >= this.left   && 
             region.right  <= this.right  && 
             region.top    >= this.top    && 
             region.bottom <= this.bottom    );

};

/**
 * Returns the area of the region
 * @method getArea
 * @return {Int} the region's area
 */

YAHOO.util.Region.prototype.getArea = function() {
    return ( (this.bottom - this.top) * (this.right - this.left) );
};

/**
 * Returns the region where the passed in region overlaps with this one
 * @method intersect
 * @param  {Region} region The region that intersects
 * @return {Region}        The overlap region, or null if there is no overlap
 */

YAHOO.util.Region.prototype.intersect = function(region) {
    var t = Math.max( this.top,    region.top    );
    var r = Math.min( this.right,  region.right  );
    var b = Math.min( this.bottom, region.bottom );
    var l = Math.max( this.left,   region.left   );
    
    if (b >= t && r >= l) {
        return new YAHOO.util.Region(t, r, b, l);
    } else {
        return null;
    }
};

/**
 * Returns the region representing the smallest region that can contain both
 * the passed in region and this region.
 * @method union
 * @param  {Region} region The region that to create the union with
 * @return {Region}        The union region
 */

YAHOO.util.Region.prototype.union = function(region) {
    var t = Math.min( this.top,    region.top    );
    var r = Math.max( this.right,  region.right  );
    var b = Math.max( this.bottom, region.bottom );
    var l = Math.min( this.left,   region.left   );

    return new YAHOO.util.Region(t, r, b, l);
};

/**
 * toString
 * @method toString
 * @return string the region properties
 */

YAHOO.util.Region.prototype.toString = function() {
    return ( "Region {"    +
             "top: "       + this.top    + 
             ", right: "   + this.right  + 
             ", bottom: "  + this.bottom + 
             ", left: "    + this.left   + 
             "}" );
};

/**
 * Returns a region that is occupied by the DOM element
 * @method getRegion
 * @param  {HTMLElement} el The element
 * @return {Region}         The region that the element occupies
 * @static
 */

YAHOO.util.Region.getRegion = function(el) {
    var p = YAHOO.util.Dom.getXY(el);

    var t = p[1];
    var r = p[0] + el.offsetWidth;
    var b = p[1] + el.offsetHeight;
    var l = p[0];

    return new YAHOO.util.Region(t, r, b, l);
};

/////////////////////////////////////////////////////////////////////////////


/**
 * A point is a region that is special in that it represents a single point on 
 * the grid.
 * @namespace YAHOO.util
 * @class Point
 * @param {Int} x The X position of the point
 * @param {Int} y The Y position of the point
 * @constructor
 * @extends YAHOO.util.Region
 */

YAHOO.util.Point = function(x, y) {
   if (YAHOO.lang.isArray(x)) { // accept input from Dom.getXY, Event.getXY, etc.
      y = x[1]; // dont blow away x yet
      x = x[0];
   }
   
    /**
     * The X position of the point, which is also the right, left and index zero (for Dom.getXY symmetry)
     * @property x
     * @type Int
     */


    this.x = this.right = this.left = this[0] = x;
     
    /**
     * The Y position of the point, which is also the top, bottom and index one (for Dom.getXY symmetry)
     * @property y
     * @type Int
     */

    this.y = this.top = this.bottom = this[1] = y;
};

YAHOO.util.Point.prototype = new YAHOO.util.Region();

YAHOO.register("dom", YAHOO.util.Dom, {version: "2.6.0", build: "1321"});

Messung V0.5 in Prozent
C=91 H=92 G=91

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.32Bemerkung:  (Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-08-26) ¤

*Eine klare Vorstellung vom Zielzustand






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002