From 3261f85627099aa0f4fc3a1b109e70f845946bc8 Mon Sep 17 00:00:00 2001 From: Elijah Insua Date: Sat, 22 Jan 2011 23:44:41 -0500 Subject: [PATCH] Revert "removed forced uppercasing of tags in jsdom" This reverts commit 3934ea19760111044f35e71dd7aedc0a49e85138. --- lib/jsdom/browser/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/jsdom/browser/index.js b/lib/jsdom/browser/index.js index 1d52945739..1352ce1879 100644 --- a/lib/jsdom/browser/index.js +++ b/lib/jsdom/browser/index.js @@ -444,6 +444,19 @@ var browserAugmentation = exports.browserAugmentation = function(dom, options) { return styles; }); + dom.Element.prototype.__defineGetter__('nodeName', function(val) { + return this._nodeName.toUpperCase(); + }); + + dom.Element.prototype.__defineGetter__('tagName', function(val) { + var t = this._tagName.toUpperCase(); + //Document should not return a tagName + if (this.nodeName === '#document') { + t = null; + } + return t; + }); + dom.Element.prototype.scrollTop = 0; dom.Element.prototype.scrollLeft = 0;