prototype: Use Object.isElement

This commit is contained in:
Sam Stephenson 2007-07-24 19:10:44 +00:00
parent c0735dba77
commit 59c3dfd87a

View File

@ -126,7 +126,7 @@ Element.Methods = {
wrap: function(element, wrapper, attributes) {
element = $(element);
if (wrapper && wrapper.nodeType)
if (Object.isElement(wrapper))
$(wrapper).writeAttribute(attributes || {});
else if (typeof wrapper == 'string') wrapper = new Element(wrapper, attributes);
else wrapper = new Element('div', wrapper);