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 reserved.
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 elements.
 * @module dom
 *
 */


(function() {
    var Y = YAHOO.util,     // internal shorthand
        lang = YAHOO.lang,
        getStyle,           // for load time browser branching
        setStyle,           // ditto
        propertyCache = {}, // for faster hyphen converts
        reClassNameCache = {},          // cache regexes for className
        document = window.document;     // 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
    var isOpera = YAHOO.env.ua.opera,
        isSafari = YAHOO.env.ua.webkit, 
        isGecko = YAHOO.env.ua.gecko,
        isIE = YAHOO.env.ua.ie; 
    
    // regex cache
    var patterns = {
        HYPHEN: /(-[a-z])/i, // to normalize get/setStyle
        ROOT_TAG: /^body|html$/i, // body for quirks mode, html for standards,
        OP_SCROLL:/^(?:inline|table-row)$/i
    };

    var toCamel = function(property) {
        if ( !patterns.HYPHEN.test(property) ) {
            return property; // no hyphens
        }
        
        if (propertyCache[property]) { // already converted
            return propertyCache[property];
        }
       
        var converted = property;
 
        while( patterns.HYPHEN.exec(converted) ) {
            converted = converted.replace(RegExp.$1,
                    RegExp.$1.substr(1).toUpperCase());
        }
        
        propertyCache[property] = converted;
        return converted;
        //return property.replace(/-([a-z])/gi, function(m0, m1) {return m1.toUpperCase()}) // cant use function as 2nd arg yet due to safari bug
    };
    
    var getClassRegEx = function(className) {
        var re = reClassNameCache[className];
        if (!re) {
            re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)');
            reClassNameCache[className] = re;
        }
        return re;
    };

    // branching at load instead of runtime
    if (document.defaultView && document.defaultView.getComputedStyle) { // W3C DOM method
        getStyle = function(el, property) {
            var value = null;
            
            if (property == 'float') { // fix reserved word
                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] || value;
        };
    } else if (document.documentElement.currentStyle && isIE) { // IE method
        getStyle = function(el, property) {                         
            switch( toCamel(property) ) {
                case 'opacity' :// IE opacity uses filter
                    var val = 100;
                    try { // will error if no DXImageTransform
                        val = el.filters['DXImageTransform.Microsoft.Alpha'].opacity;

                    } catch(e) {
                        try { // make sure its in the document
                            val = el.filters('alpha').opacity;
                        } catch(e) {
                        }
                    }
                    return val / 100;
                case 'float'// fix reserved word
                    property = 'styleFloat'// fall through
                default
                    // test currentStyle before touching
                    var value = el.currentStyle ? el.currentStyle[property] : null;
                    return ( el.style[property] || value );
            }
        };
    } else { // default to inline only
        getStyle = function(el, property) { return el.style[property]; };
    }
    
    if (isIE) {
        setStyle = function(el, property, val) {
            switch (property) {
                case 'opacity':
                    if ( lang.isString(el.style.filter) ) { // in case not appended
                        el.style.filter = 'alpha(opacity=' + val * 100 + ')';
                        
                        if (!el.currentStyle || !el.currentStyle.hasLayout) {
                            el.style.zoom = 1// when no layout or cant tell
                        }
                    }
                    break;
                case 'float':
                    property = 'styleFloat';
                default:
                el.style[property] = val;
            }
        };
    } else {
        setStyle = function(el, property, val) {
            if (property == 'float') {
                property = 'cssFloat';
            }
            el.style[property] = val;
        };
    }

    var testElement = function(node, method) {
        return node && node.nodeType == 1 && ( !method || method(node) );
    };

    /**
     * Provides helper methods for DOM elements.
     * @namespace YAHOO.util
     * @class Dom
     */

    YAHOO.util.Dom = {
        /**
         * Returns an HTMLElement reference.
         * @method get
         * @param {String | HTMLElement |Array} el Accepts a string to use as an ID for getting a DOM reference, an actual DOM reference, or an Array of IDs and/or HTMLElements.
         * @return {HTMLElement | Array} A DOM reference to an HTML element or an array of HTMLElements.
         */

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

                if (typeof el === 'string') { // id
                    return document.getElementById(el);
                }
                
                if ('length' in el) { // array-like 
                    var c = [];
                    for (var i = 0, len = el.length; i < len; ++i) {
                        c[c.length] = Y.Dom.get(el[i]);
                    }
                    
                    return c;
                }

                return el; // some other object, just pass it back
            }

            return null;
        },
    
        /**
         * Normalizes currentStyle and ComputedStyle.
         * @method getStyle
         * @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.
         * @param {String} property The style property whose value is returned.
         * @return {String | Array} The current value of the style property for the element(s).
         */

        getStyle: function(el, property) {
            property = toCamel(property);
            
            var f = function(element) {
                return getStyle(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
         * @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.
         * @param {String} property The style property to be set.
         * @param {String} val The value to apply to the given property.
         */

        setStyle: function(el, property, val) {
            property = toCamel(property);
            
            var f = function(element) {
                setStyle(element, property, val);
                
            };
            
            Y.Dom.batch(el, f, Y.Dom, true);
        },
        
        /**
         * Gets the current position of an element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
         * @method getXY
         * @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
         * @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.parentNode === null || el.offsetParent === null ||
                        this.getStyle(el, 'display') == 'none') && el != el.ownerDocument.body) {
                    return false;
                }
                
                return getXY(el);
            };
            
            return Y.Dom.batch(el, f, Y.Dom, true);
        },
        
        /**
         * Gets the current X position of an element based on page coordinates.  The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
         * @method getX
         * @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
         * @return {Number | Array} The X position of the element(s)
         */

        getX: function(el) {
            var f = function(el) {
                return Y.Dom.getXY(el)[0];
            };
            
            return Y.Dom.batch(el, f, Y.Dom, true);
        },
        
        /**
         * Gets the current Y position of an element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
         * @method getY
         * @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
         * @return {Number | Array} The Y position of the element(s)
         */

        getY: function(el) {
            var f = function(el) {
                return Y.Dom.getXY(el)[1];
            };
            
            return Y.Dom.batch(el, f, Y.Dom, true);
        },
        
        /**
         * Set the position of an html element in page coordinates, regardless of how the element is positioned.
         * The element(s) must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
         * @method setXY
         * @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
         * @param {Array} pos Contains X & Y values for new position (coordinates are page-based)
         * @param {Boolean} noRetry By default we try and set the position a second time if the first fails
         */

        setXY: function(el, pos, noRetry) {
            var f = function(el) {
                var style_pos = this.getStyle(el, 'position');
                if (style_pos == 'static') { // default to relative
                    this.setStyle(el, 'position''relative');
                    style_pos = 'relative';
                }

                var pageXY = this.getXY(el);
                if (pageXY === false) { // has to be part of doc to have pageXY
                    return false
                }
                
                var delta = [ // assuming pixels; if not we will have to retry
                    parseInt( this.getStyle(el, 'left'), 10 ),
                    parseInt( this.getStyle(el, 'top'), 10 )
                ];
            
                if ( isNaN(delta[0]) ) {// in case of 'auto'
                    delta[0] = (style_pos == 'relative') ? 0 : el.offsetLeft;
                } 
                if ( isNaN(delta[1]) ) { // in case of 'auto'
                    delta[1] = (style_pos == 'relative') ? 0 : el.offsetTop;
                } 
        
                if (pos[0] !== null) { el.style.left = pos[0] - pageXY[0] + delta[0] + 'px'; }
                if (pos[1] !== null) { el.style.top = pos[1] - pageXY[1] + delta[1] + 'px'; }
              
                if (!noRetry) {
                    var newXY = this.getXY(el);

                    // if retry is true, try one more time if we miss 
                   if ( (pos[0] !== null && newXY[0] != pos[0]) || 
                        (pos[1] !== null && newXY[1] != pos[1]) ) {
                       this.setXY(el, pos, true);
                   }
                }        
        
            };
            
            Y.Dom.batch(el, f, Y.Dom, true);
        },
        
        /**
         * Set the X position of an html element in page coordinates, regardless of how the element is positioned.
         * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
         * @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.
         * @param {Int} x The value to use as the X coordinate for the element(s).
         */

        setX: function(el, x) {
            Y.Dom.setXY(el, [x, null]);
        },
        
        /**
         * Set the Y position of an html element in page coordinates, regardless of how the element is positioned.
         * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
         * @method setY
         * @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.
         * @param {Int} x To use as the Y coordinate for the element(s).
         */

        setY: function(el, y) {
            Y.Dom.setXY(el, [null, y]);
        },
        
        /**
         * Returns the region position of the given element.
         * The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
         * @method getRegion
         * @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.
         * @return {Region | Array} A Region or array of Region instances containing "top, left, bottom, right" member data.
         */
        getRegion: function(el) {
            var f = function(el) {
                if ( (el.parentNode === null || el.offsetParent === null ||
                        this.getStyle(el, 'display') == 'none') && el != el.ownerDocument.body) {
                    return false;
}

                var region = Y.Region.getRegion(el);
                return region;
            };
            
           Y.om.el ,YDom, true)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
}
        
            // brower detection
 client v)
         @ethod getClientWidth
         * @deprecated Now using getViewportWidth.  This interface left intact for back compat.
          return {Int}The width of the viewable area of the page.
         */

        getClientWidth /(inlinetablerow/
            return..test  java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
        },
        
        /**
          Returns the height of the client (viewport).
tClientHeight
*deprecated Now using getViewportHeight.Thisinterface left intact for back compat.
    var getClassRegEx =function(className) {
         */

       getClientHeight function)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
            return Y.Dom.getViewportHeight();
        },

/**
         * Returns  array of HTMLElements with the given class.
      For optimized performance, include a tag and/or root node when possible.
         * Note: This  varvalue = null;
         * collection in the callback (removing/appending nodes, etc.) will have
* side effects.  Instead you should iterate the returned nodes array,
         * as you would with the native "getElementsByTagName" java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 52
         *@method getElementsByClassName
         *     }elseif(document.documentElement.currentStyle && isIE) { // IE method
         * @param {String} tag (optional) The tag name of the elements being collected
         *@param {tring| 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 
                            val =el.filters('lpha)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
         */

        getElementsByClassName:function(className,tag root,apply) {
            className = lang.trim(className);
            tag = tag || '*';
           root =(root) ?YDom.getroot : null || document; 
            if (!root) {
                return [];
            }

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

            for (var i = 0, len = elements.length; i < len; ++i) {
                if ( re.java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 25
                    nodes[                    varvalue  el.currentStyle ?elcurrentStyle[property] : null;
                    if (apply) {
                        applycallelements[i] elements[i]);
                    }
                }
            }
            
                } else { /defaulttoinline only
                 =function(el, property){return el.style[property]; };

        /**
         * java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 5
         * @method        setStyle = (el,property, val) {
         * @param {String |                 case 'opacity':
         * @param {String} className the class name to search for
         * @return {Boolean | Array} A boolean value or array of boolean values
         */

        hasClass: function(el, className) {
            var re = getClassRegEx(className);

            var f = function(el) {
                return re.test(el.java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 24
            };
            
            return Y.Dom.batch(el, f, Y.Dom, true);
        },
    
        /**
         * Adds a java.lang.StringIndexOutOfBoundsException: Range [28, 21) out of bounds for length 77
         }
         * @param {String break;
         * @param                     
         * @return                el.tyle[property] = val;
         */

        addClass functionel,className java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
            var f = function(el) {
                ifif(roperty = float) {
                    return false// already present
                }
                
                
                el.className = lang.trim([el.className, className].join(' '));
                return true;
            };
            
            return Y.Dom.batch(el, f,         return node & node.==1 & (!method | method(node))java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
        },
    
        /**
         Removes a class name from a given element or collection of elements.
         * @method removeClass         
          param{String  HTMLElement |Array}} elTheelement or collection to remove the class from
{String className the class name to remove from the class attribute
         * @return {Boolean | Array} A pass/fail boolean or array of booleans
         */

        removeClass: function(el, className) {
            var re = getClassRegEx(className);
            
            var f = function(el) {
                var ret = false,
                    current = el.className;

ifclassName & current& hasClass(l className){
                    
                    el.className = current.replace(re, ' ');
                    if ( this.hasClass(el, className) ) { // in case of multiple adjacent
                        this.removeClass(el, className);
                    }

                   elclassName=langtrimel.className); // remove any trailing spaces
                   if elclassName === '') { // remove class attribute if empty
                        var attr = (el.hasAttribute) ? 'class' : 'className';
el.removeAttribute(attr);
                    }
                    ret = true;
                }                 
                return ret;
            };
            
            return Y. returndocument.getElementById(el);
        },
        
        /**                     c =[]
         Replace aclass  another class for a given element or collection of elements.
         *                    
         *@method replaceClass  
         * @ returnel // some other object, just pass it back
         * @param {java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 10
         * @param {String} newClassName the class name that will be replacing the old class java.lang.StringIndexOutOfBoundsException: Range [0, 96) out of bounds for length 27
         * @return {Boolean | Array} A pass/fail boolean or array of booleans
         */

        replaceClass: function(el, oldClassName, newClassName) {
            if (!newClassName || oldClassName === newClassName) { // avoid infinite loop
                return false;
            }
            
            var re = getClassRegEx(oldClassName         *@return {String|Array The current value of the style property fortheelement(s.

            var f = function(el) {
            
                if ( !this.hasClass(el, java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 11
                    .addClass(l newClassName);// just add it if nothing to replace
                    return true// NOTE: return

            
                el            return Y.batch, f,Y., true);

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

                el.className = lang.trim(el.className); // remove any trailing spaces         *@method etStyle
                return true;
            };
            
            return Y.Dom.batch(el, f, Y.Dom, true);
        ,
        
        /**
          Returns  ID and applies it  the element "el", if provided.
         * @method                setStyle(element,property,val;
         *@ {tring|HTMLElement | Array} el (optional) An optional element array of elements to add an ID to (no ID is added if  },
         * @param {String} prefix (optional) an optional prefix to use (defaults to "yui-gen").
         * @return {String | Array} The generated ID, or array of generated IDs (or original ID if already present on an element)
         */

generateId functionel prefix 
            prefix = prefix || 'yui-gen';

            var f = function(el) {
                if (el && el.id) { // do not override existing ID
                    return elid
                } 

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

                 eljava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
elid  ;
                                    false
                
                return             
            };

            // batch fails when no element, so just generate and return single ID
..elf .om,true |f.pplyY )
        },
        
        /**
         * Determines whether an HTMLElement is an ancestor of another HTML element in the DOM hierarchy.
*@ isAncestor
         * @param {String | HTMLElement} haystack The possible ancestor
         * @param {String | HTMLElement} needle The possible descendent
         * @return {Boolean} Whether or not the haystack is an ancestor of needle
         */

(haystack needle java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
            haystack
            needle = Y.Domjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
            
            var ret = false;

                     * @method 
                if(haystack.contains & haystack != needle){ 
                    ret = haystack.contains(needle);
                }
                else if (haystack.compareDocumentPosition) *@{  Yjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 68
                    ret = !!(haystack.compareDocumentPosition(needle) &
                }
             /**
            }
            return ret;
        ,
        
        /**
         * Determines whether an HTMLElement is present in the current document.
 inDocument         
         * @param {String |           @aram {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of java.lang.StringIndexOutOfBoundsException: Index 129 out of bounds for length 97
         * @return {Boolean} Whether or not the element is present in the current document
         */

        inDocument: function(el) {
            return this.isAncestor(document.documentElement, el);
        },
        
        /**        setXY:function, pos,noRetry){
         * Returns a array of  var =function(el){
         * For optimized performance, include a java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 43
         * Note:  method operates against a live , so modifyingthe 
         * collection in the callback (removing/appending nodes, etc parseInt( this.getStyle(,left) 10 ,
         * side effects([]   /in  of''
         *  you wouldwiththe ative getElementsByTagName" method. 
         * @method getElementsBy
 (!){
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         * @param {String                         1 ! null && newXY[1 ! pos[] ) java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
         java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
*A ofHTMLElements
         */

        getElementsBy: function(method, tag, root, apply) {
            tag = tag || '*';
 Y.omgetr   |document 

            if (!root) {
                return [];
            }

            var nodes = [],
.getElementsByTagNametag)
            
            for (var i = 0, len = elements.length;          * @param {Int} x The value to use as the X  ()
 ]{
                    nodes[nodes.length] = elements[i];
                    () {
                        apply(elements[i]);
                    java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
                }
            }

            
                     * @param  HTMLElement|Array Acceptsa  usejava.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 150
        },
        
        /**
         * Runs the supplied method against each item in the Collection/Array.
         * The method is called with the element(s) as the first arg, and the optional param as the second ( method(el, o) ).
         * @method batch
         * @param {String | HTMLElement | Array} el (optional) An element or array of elements to apply the method to
*param{unction} method The method to apply element(s)
         * @param {Any} o (optional) An optional arg that is passed to the supplied method
         * @param {Boolean} override (optional) Whether or not to override the scope of "method" with "o"
         * @return {Any | Array} The return value(s) from the supplied method
         */

batch e,methodo ) java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
            

            if (!el || !method) {
                returnreturnDom(el,,;
            } 
            var scope = (java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 11
            
)  // element or not array-like 
                return method.call(scope, el, o);
            } 

            var = [;
                       
            for (
                collection[collection.length] = method.call(scope, el[i], o);
            }
            
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 30
,

        /**
         *  * Returnsaarray of HTMLElements with the given class.
         * @method getDocumentHeight
         * @return {Int} The height of the actual document (which includes the java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 82
         */

        getDocumentHeight:          * side effects.  Instead yjava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 78
var  (document.ompatMode = CSS1Compat'  .:java.lang.StringIndexOutOfBoundsException: Range [109, 108) out of bounds for length 138

            var h = Math.max(scrollHeight, Y.Dom.getViewportHeight());
return hjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
},
        
        /**
         * Returns the width of the document.
         * @method getDocumentWidth
         * @return {Int} The width of the actual document (which includes the body and its margin).
         */
        getDocumentWidth: function() {
 
document! CSS1Compat  body:documentdocumentElement.scrollWidth;
            var w = Math.max(scrollWidth, Y.Dom.getViewportWidth());
            return w;
        },

/**
   java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 54
         * @method getViewportHeight
*r   viewableareajava.lang.StringIndexOutOfBoundsException: Range [0, 59) out of bounds for length 36
         */

        getViewportHeight: function() {
            var height = self.innerHeight; // Safari, Opera
var   java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43

ifmode &           
                height = (document = window.document
                        document.documentElement.clientHeight java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    bodyclientHeight 
            }
        
    }java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
        ,
        
        /**
         *
*method getViewportWidth
         * @return {Int} The width of the viewable area of the page (excludes scrollbars).
         */

        
        getViewportWidthvar re = reClassNameCache[className];
            var width = self.innerWidthif(re 
             mode=documentcompatMode
            
            if (mode || isIE) { // IE, Gecko, Opera
                width =   (, java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Range [32, 24) out of bounds for length 75
                        document.body.            }
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
            
,

       /**
         * Returns the nearest ancestor that passes the test applied by supplied boolean method.
         * For performance reasons, IDs are not accepted                
         * @method getAncestorBy
         * @param {HTMLElement} node The HTMLElement to use as the starting point 
if(h(el,className                     
         * @return {Object} HTMLElement or  try { error 
         */

        getAncestorByjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
            while
                if (}

                }
            } 

            return null;
        },
        
        /**
         * Returns the nearest ancestor with the given className.
 method getAncestorByClassName
          param{String |HTMLElement} node The HTMLElement or an ID to use    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
         * @param {String} className
  O 
         */

  ){
            node =                    java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
            if el  .elc;// remove any trailing spaces
                return null;
            }
            var                     java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
.(,java.lang.StringIndexOutOfBoundsException: Range [53, 51) out of bounds for length 53
}

        
         *java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 63
*@java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 39
*param  java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 100
         * @param {String} tagName
         *@return HTMLElement
         */
        *  java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 44
            node=YDom(node)
!)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
returnjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
            }
            var method = function                
                 return el.                    return documentgel
            };

            returnc]..get[}
        },

        /**
*java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 64
         * For                  addClass(el,newClassName;/java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
   java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
* method 
         * @param {HTMLElement} node  
 used to test siblings
         * that receives the sibling node being tested as its only argument
         * @return {Object} HTMLElement/**
         */

        getPreviousSiblingBy: function(node, method) {
            while (node) {
                node = node.previousSibling;
                if ( testElement(eoptional  elementarrayofto an ID to(no ID is added ifone is lreadypresent)
                    return node;
                }
            }
            return null;
        }, 

        /**
         * Returns the previous sibling that is an HTMLElement 
         * @method getPreviousSibling
*param String |HTMLElement} The or an ID touse asstarting  
         * @return {Object}         generateId: function(el, prefix{
         */

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

            return Yjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
        }, 

        /**
that    .
        Forperformance  are not acceptedand   .
         * Returns         p String   java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 51
         * @method getNextSiblingBy
         * @param {HTMLElement} node The HTMLElement to use as the starting java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
         * @param {            =          param{java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 150
         * that receives the sibling node being tested as its java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 0
*{Object java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 60
         */

:functionnode  
            while (node) {
                node = node.nextSibling;
                if ( java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 8
                    property = toCamelinDocument
                }
            java.lang.StringIndexOutOfBoundsException: Range [16, 13) out of bounds for length 49
            return null;
        }, 

/**
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 59
          @method getNextSibling
  param{|HTMLElement}  TheHTMLElement or  ID to use as the starting point 
e orifjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60

java.lang.StringIndexOutOfBoundsException: Range [32, 8) out of bounds for length 40
            java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
         Getsthe    based  java.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 200
                return null;
            }

            return Y.Dom.getNextSiblingBy( param{              of
        }, 

java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 11
 thefirst  child             }
         * @method getFirstChildBy
}nodeHTMLElement to as the starting point
         * @param {Function}           method 
         * that receives the node being tested as its only argument
         * @return {Object} HTMLElement or null if not found
         */

 (,method{
            var        :nodes] =elements[];
ld |                return Y.Dom.l1;



         * Returns the first HTMLElement child. 
         * @method getFirstChild
          p String*Runsthe method  Collectionjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
if notfound
*
        getFirstChild: function(node, method          @param{|HTMLElement|}el()Anelementorarrayof  the to
              Y.Dom.get(ode;
            if (!node) {
                return null;
            
            D.getFirstChildBynode)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
        }, 

        /**
  lastjava.lang.StringIndexOutOfBoundsException: Range [45, 39) out of bounds for length 75
 
 aram H} node The  HTMLElement to use  the starting point 
   java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 18
*that receives  node being tested as its only argument
         *@return {var scope = (override o windowjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
         */

        getLastChildByifp[]!=null  .java.lang.StringIndexOutOfBoundsException: Range [42, 47) out of bounds for length 14
             !)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
 
            }
             child (java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 12
            child|YDom
java.lang.StringIndexOutOfBoundsException: Range [16, 11) out of bounds for length 25

        /**
         * Returns the last}
         @ethod 
         * @param {String | HTMLElement}        getDocumentHeight: function(){
         * @return {Object} HTMLElement or null if not found
         */

        getLastChild: function(node)         java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
            node = Y.Dom.get(node);
            return Y.Dom.getLastChildBy(node);
        }, 

        /**
         * Returns an array of HTMLElement childNodes that pass the * java.lang.StringIndexOutOfBoundsException: Range [42, 39) out of bounds for length 150
         * @method getChildrenBy
*param {TMLElement} node TheHTMLElement to start from
         * @param {Function} method A boolean function used to test children
         * that receives the node being tested as its only 
        
         */

       function,*
           var =YDomgetFirstChildBynode,method);
            var children = child ? [child] :  var  = self.;// Safari,Opera

            Y. if((mode|| isIE & isOperacoordinateforelement()
if!thod|methodn  java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
                    children[children.length] = node;
                }
                return false// fail test to collect all children
            });

            /**
}java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
 

*Returnsanarray of HTMLElement childNodes. 
         * @method getChildren
         * @param {String |                        getStylee,)             .  Safari
         * @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 
         java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
         * @         * @metho getAncestorBy
         * @return {Int}  The * @deprecated Now using getViewportHeight  intact for backcompat.
         */

                    return Y.Dom.getViewportHeight();
            doc        
            return Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft);
        }, 

        /**
*java.lang.StringIndexOutOfBoundsException: Range [22, 18) out of bounds for length 56
         * @method getDocumentScrollTop
         *@aram H}document optional)The  toget
 return }
         */

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

        /**
         * Inserts the new node as the previous sibling of the *param {String} className
         * @method insertBefore
         * @param {String | HTMLElement} newNode The node            node =YDomgetnode);
        *@ String |HTMLElement} referenceNode The node to insert the new node before 
         * @return {HTMLElement} The node that was         **
         */

insertBefore function(ewNode ){
..(java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
            referenceNode = Y.Dom.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            
            
                return null;
            }       

java.lang.StringIndexOutOfBoundsException: Range [32, 18) out of bounds for length 82
        },

        /**
e }
         * @         om java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
*Returnstheprevious sibling is HTMLElement.
         * @param {String*For performance reasons,IDs arenotaccepted and  validation omittedjava.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
         * @return {HTMLElement} The node that was inserted (or null if insert fails) 
         */

insertAfter (ewNode,referenceNode) {
.get(newNodereturnDom,f Y,true
            referenceNode = Y.Dom.get(referenceNode); 
            
            if (!newNode || !referenceNode || !referenceNode.parentNode) {
                return null;
             


                return referenceNode.parentNodewhilenode java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
            } else {
                return referenceNode.parentNode.appendChild(newNode);
                                 
        },

        /**
   based viewport   document.
         * @method getClientRegion
*@return {egion}  Region         * @param {String | HTMLElement | ATheelement or collection to remove the class from
         */

        getClientRegion: function() {
             t=Y.getDocumentScrollTop(),
                l = Y.Dom.getDocumentScrollLeft(),
                r = Y.Dom.getViewportWidth() + l,
                b = Y.Dom.java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 28

            return new returnYDomgetPreviousSiblingBy
        java.lang.StringIndexOutOfBoundsException: Range [20, 9) out of bounds for length 20
    };
    
               performancereasons,IDs notaccepted and argument validation omitted.
                            className         Returns the nearestHTMLElement sibling ifno method provided.
             {
                var               var attr  (.asAttribute ?class:'lassName'java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
                    round = Math.round;

                var rootNode = el.ownerDocument            ;
                return            return Y.Dom.batch(,f .Dom true;
                        Y.Dom.                        Y.Dom.getDocumentScrollTopjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 92
            };
        } else {
            return function node=node.nextSiblingjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
                var pos = [el.offsetLeft, el.offsetTop];
                var parentNode java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 102

                // safari: subtract body offsets if el is abs (or any offsetParent), unless body is offsetParent
                var
                        Y.Dom.getStyle(el, 'position') == *@{oolean| /booleanarrayofjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 59
                        el.offsetParent == el.ownerDocument.body);

                if (parentNode!=el {
                    while parentNode) {
pos[] +=parentNode.offsetLeft;
                        pos[1] += parentNode.offsetTop;
                        if (!accountForBody && isSafari            
                                Y.Dom.getStyle(parentNode,'position'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
                        }
parentNode.java.lang.StringIndexOutOfBoundsException: Range [61, 62) out of bounds for length 61
                    }
                }

                if            ;
pos0 =elownerDocument.body.offsetLeft;
                    pos[1] -= el.ownerDocument.body.offsetTop;
                } 
                parentNode = el.parentNode;

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

                return          @ String| Thegenerated ID    java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 11
            };
        }
    }() // 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 java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 14
 * other shapes are required        ,
 * @namespace          * @method 
 * @class Region
 * @param {Int} t the top extent
 * @aram{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
     * @        
     * @type         getLastChildBy: function(node, method) {
     */

    this.top = t;
    
    /**
     * The region's top extent         *
     * @property 1
     * @type Int
     */

    this1]=t;

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

    this.right = r;

    /**
     * The * ..(odejava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
     * @property bottom
     * @type Int
     */

    this.bottom = b;

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

    left=;
    
       root = (root) ? Y.Dom.get(root) : null | document;java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
     * The region's left extent as index, for symmetry with set/getXY
     * @property 0
     *  =rootgetElementsByTagName)
/
    this[0] = l;
};


 * Returns                    childrenlength]= node        ,
 * @method contains
 * @param  {Region}  region The region to evaluate
*r{BooleanTrue region is  with )java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
 *                          else false
 */
YAHOO.        /*
    .left   &&java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
             region.right  <= this.right  && 
             region.top    >= this.top    && 
            region.ottom< )java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

};

/**
 * Returns the area of the region
 * @        batch: function(el, method, o,  getChildren: function(node) {
 * @return {Int} the region's area
 */

YAHOO.
return ((thisbottom -thistop) *(this.right- this.eft
};

/**
/
 * @method intersect
 * @param  {Region} java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 12
 /
 */

YAHOO.util.Region.prototype.intersect = function(region) {
java.lang.StringIndexOutOfBoundsException: Range [26, 4) out of bounds for length 51
    var r = Math.min( this.right,  region.right  );
    var  min bottom regionbottom ;
    var l = Math.max( this.left,   region.left   );
    
    if (b >= t && r >= l) {
        returnvar  d. ='java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 34
    } else {
        return null;
    }
};

/**
 * Returns the region representing the smallest region         */
 * the passed in region and this region.
 * @method union
   Region} r  to  union 
 * @/**
 */

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 =         */

 uRegion,,,)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

**
 * toString
 * @method toString
r         * Returns the  the .
 */

YAHOO.util.Region.prototype.toString = function() {
    return ( "Region {"    +
             top         thist    java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
t    +thisright+ 
             ", bottom: "  + this.bottom + 
"left      .   +
             "}" );
}width (ode ='CSS1Compat' ?


  regionthatisjava.lang.StringIndexOutOfBoundsException: Range [36, 28) out of bounds for length 55
 * @method getRegion

 R}Thethatthe elementoccupies
 * @static
 */
.utilRegiongetRegion = function(el) {
    var p = YAHOO.util.         * @param {Functionmethod-booleanfortestingreturnnulljava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28

    var t = p[1];
 [0 .java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
    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 java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 28
* grid
*namespace  =D.java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 49
 * @class Point
 *                  Y.om.etViewportWidth(  java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 * @param {Int} y The Y position of the             new .Regiont, r,b )java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
 * @constructor
 *  .Domget(;
 */

YAHOO round= Math.ound;
   if (YAHOO.lang.isArray(x)) { // accept input from Dom.getXY, Event.getXY, etc.
       =x1
      x =returnround.left+ Y.getDocumentScrollLeft(             YDom(,method;
   }
   
    /**
        java.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
     * @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)
     * @java.lang.StringIndexOutOfBoundsException: Range [24, 1) out of bounds for length 55
     * @type Int                                .omgetStyle(parentNode,'osition') == 'absolute' ) { 
     */

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

YAHOO.util.Point.prototype = new YAHOO.util.Region                 (accountForBody  //safari doubles in this case

YAHOO. pos1 -=el.wnerDocument.body.ffsetTop;

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

¤ 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.46Bemerkung:  ¤

*Bot Zugriff






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