From 59c3dfd87aa43e62d982b1a450841f553ccb0120 Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Tue, 24 Jul 2007 19:10:44 +0000 Subject: [PATCH] prototype: Use Object.isElement --- src/dom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dom.js b/src/dom.js index b10b917..f485a7f 100644 --- a/src/dom.js +++ b/src/dom.js @@ -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);