diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compiler.js | 4 | ||||
| -rw-r--r-- | src/jqLite.js | 4 | ||||
| -rw-r--r-- | src/markups.js | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/Compiler.js b/src/Compiler.js index a762b5fd..376235f7 100644 --- a/src/Compiler.js +++ b/src/Compiler.js @@ -136,7 +136,7 @@ Compiler.prototype = { // process markup for text nodes only eachTextNode(element, function(textNode){ var text = textNode.text(); - foreach(self.textMarkup, function(markup){ + foreach(self.textMarkup, function(markup, name){ markup.call(selfApi, text, textNode, element); }); }); @@ -144,7 +144,7 @@ Compiler.prototype = { if (directives) { // Process attributes/directives - eachAttribute(element, function(value, name){ + eachAttribute(element, function(value){ foreach(self.attrMarkup, function(markup){ markup.call(selfApi, value, name, element); }); diff --git a/src/jqLite.js b/src/jqLite.js index 92bc22a7..67e1717c 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -191,9 +191,9 @@ JQLite.prototype = { text: function(value) { if (isDefined(value)) { - this[0].textContent = value; + this[0].nodeValue = value; } - return this[0].textContent; + return this[0].nodeValue; }, val: function(value) { diff --git a/src/markups.js b/src/markups.js index 5c069f49..4207d83f 100644 --- a/src/markups.js +++ b/src/markups.js @@ -53,7 +53,7 @@ angularTextMarkup('{{}}', function(text, textNode, parentElement) { // TODO: this should be widget not a markup angularTextMarkup('OPTION', function(text, textNode, parentElement){ - if (parentElement[0].nodeName == "OPTION") { + if (nodeName(parentElement) == "OPTION") { var select = document.createElement('select'); select.insertBefore(parentElement[0].cloneNode(true), null); if (!select.innerHTML.match(/<option(\s.*\s|\s)value\s*=\s*.*>.*<\/\s*option\s*>/gi)) { |
