The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
Return to Node class utilities and optimizations
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.06.27-20-10'
}).use('gallery-node-optimizations', function(Y) {
Y.one('#item2').ancestor('ul');
Y.one('#root').getElementsByClassName('my-data:[a-z]+');
});
/home/y/libexec/ant/bin/ant all Buildfile: build.xml [echo] Starting Build For gallery-node-optimizations clean: init: [mkdir] Created dir: /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-node-optimizations/build_tmp [echo] Starting Build For gallery-node-optimizations -lint-server: [echo] Starting Build For gallery-node-optimizations -node: [echo] For faster builds, install Node.js. -concatdebug: [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-node-optimizations/build_tmp/ant [delete] Deleting directory /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-node-optimizations/build_tmp/ant -registerdebug: [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-node-optimizations/build_tmp -prependdebug: -appenddebug: builddebug: -createcore: [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-node-optimizations/build_tmp -loggerregex: buildcore: -rollupjs: -concatskins: -buildskins: -rollupcss: buildskins: -buildlangs: -rolluplangs: buildlangs: build: minify: [yuicompressor] Compressing /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-node-optimizations/build_tmp/gallery-node-optimizations.js [yuicompressor] [yuicompressor] [WARNING] Invalid hint syntax: use strict [yuicompressor] add("gallery-node-optimizations",function(Y){ ---> "use strict" <--- ;var tag_class_name_re=/^([a-z]*).([-_a-z0-9]+)$/i;var class_name_re=/^.([-_a-z0-9]+)$/i [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] ){"use strict";var tag_class_name_re=/^([a-z]*).([-_a-z0-9]+)$/i; ---> var <--- class_name_re=/^.([-_a-z0-9]+)$/i;var tag_name_re=/^[a-z]+$/i;Y [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] tag_class_name_re=/^([a-z]*).([-_a-z0-9]+)$/i;var class_name_re=/^.([-_a-z0-9]+)$/i; ---> var <--- tag_name_re=/^[a-z]+$/i;Y.Node.class_re_prefix= [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] ;Y.Node.class_re_suffix=")(?:\s|$)"; ---> var <--- orig_ancestor=Y.Node.prototype.ancestor; [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] ).getElementsByTagName(tag_name||"*"); ---> var <--- list=new Y.NodeList();for [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] new Y.NodeList();for( ---> var <--- i=0;i var <--- e=descendants[i];if(Y [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] while(list1.length){for( ---> var <--- i=0;i var <--- root=list1[i],children=root [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] .children||root.childNodes;for( ---> var <--- j=0;j var <--- e=children[j];if(Y [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] list2=[];}}else{ ---> var <--- descendants=Y.Node.getDOMNode(this) [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] getElementsByTagName(tag_name||"*");for( ---> var <--- i=0;i i <--- =0;i var <--- e=descendants[i];if(Y [yuicompressor] [yuicompressor] [WARNING] The variable e has already been declared in the same scope... [yuicompressor] descendants.length;i++){var ---> e <--- =descendants[i];if(Y. [yuicompressor] [yuicompressor] [WARNING] The symbol tag_class_name_re is declared but is apparently never used. [yuicompressor] This code can probably be written in a more compact way. [yuicompressor] ,function(Y){"use strict";var ---> tag_class_name_re <--- =/^([a-z]*).([-_a-z0-9]+)$/i;var class_name_re=/^.([-_a-z0-9]+)$/i;var tag_name_re [yuicompressor] Compressed to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-node-optimizations/build_tmp/gallery-node-optimizations-min.js lint: [echo] Using Rhino. Install nodejs to improve jslint speed, or skip with -Dlint.skip=true [java] Running JSLint on : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-node-optimizations/build_tmp/gallery-node-optimizations.js [java] [java] [java] 16, 39: Unescaped '-'. [java] var tag_class_name_re = /^([a-z]*).([-_a-z0-9]+)$/i; [java] [java] 17, 31: Unescaped '-'. [java] var class_name_re = /^.([-_a-z0-9]+)$/i; [java] [java] 276, 19: 'i' is already defined. [java] for (var i=0; i
All code on this site is licensed under the BSD License unless stated otherwise.