From cb5b95add2782fc939d6fca17c81e8653b459fb7 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 21 Feb 2014 15:43:25 +0000 Subject: [PATCH] Extend fakedom to support .value property So that 88ffb2ad12893365bb81c481d1778dd2f9b7564f will work on the server --- core/modules/utils/fakedom.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/modules/utils/fakedom.js b/core/modules/utils/fakedom.js index 8717f0ee5..18f9ffe5b 100755 --- a/core/modules/utils/fakedom.js +++ b/core/modules/utils/fakedom.js @@ -105,6 +105,15 @@ Object.defineProperty(TW_Element.prototype, "className", { } }); +Object.defineProperty(TW_Element.prototype, "value", { + get: function() { + return this.attributes["value"] || ""; + }, + set: function(value) { + this.attributes["value"] = value; + } +}); + Object.defineProperty(TW_Element.prototype, "outerHTML", { get: function() { var output = [],attr,a,v;