Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7836

Show
Ignore:
Timestamp:
10/11/07 06:11:26 (2 years ago)
Author:
sam
Message:

prototype: Element#wrap now returns the wrapper instead of the element being wrapped.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spinoffs/prototype/trunk/CHANGELOG

    r7835 r7836  
    11*SVN* 
     2 
     3* Element#wrap now returns the wrapper instead of the element being wrapped.  [sam] 
    24 
    35* Namespace all custom event names to avoid conflicts with native DOM events.  [sam] 
  • spinoffs/prototype/trunk/src/dom.js

    r7810 r7836  
    154154      element.parentNode.replaceChild(wrapper, element); 
    155155    wrapper.appendChild(element); 
    156     return element
     156    return wrapper
    157157  }, 
    158158 
  • spinoffs/prototype/trunk/test/unit/dom.html

    r7334 r7836  
    570570    }}, 
    571571     
     572    testElementWrapReturnsWrapper: function() {with(this) { 
     573      var element = new Element("div"); 
     574      var wrapper = element.wrap("div"); 
     575      assertNotEqual(element, wrapper); 
     576      assertEqual(element.up(), wrapper); 
     577    }}, 
     578     
    572579    testElementVisible: function(){with(this) { 
    573580      assertNotEqual('none', $('test-visible').style.display);