code: function(node, method) {
              while ( (node = node[PARENT_NODE]) ) { // NOTE: assignment
                  if ( Y.Dom._testElement(node, method) ) {
                      YAHOO.log('getAncestorBy returning ' + node, 'info', 'Dom');
                      return node;
                  }
              } 
  
              YAHOO.log('getAncestorBy returning null (no ancestor passed test)', 'error', 'Dom');
              return null;
          }
docs: Returns the nearest ancestor that passes the test applied by supplied boolean method.
  For performance reasons, IDs are not accepted and argument validation omitted.
  @method getAncestorBy
  @param {HTMLElement} node The HTMLElement to use as the starting point
  @param {Function} method - A boolean method for testing elements which receives the element as its only argument.
  @return {Object} HTMLElement or null if not found