aboutsummaryrefslogtreecommitdiffstats
path: root/src/jqLite.js
diff options
context:
space:
mode:
authorMisko Hevery2010-04-12 14:28:15 -0700
committerMisko Hevery2010-04-12 14:28:15 -0700
commit2637d4e90c8a43436d21a4b9e790b00ae461c438 (patch)
treea952ccff0f34595a6624a01e840df823665c09a9 /src/jqLite.js
parent843bd355d25ebf2369aec79f98cb6704d38497e9 (diff)
downloadangular.js-2637d4e90c8a43436d21a4b9e790b00ae461c438.tar.bz2
removed Meta and allowed binding of HTML
Diffstat (limited to 'src/jqLite.js')
-rw-r--r--src/jqLite.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/jqLite.js b/src/jqLite.js
index 6fc16e57..d4c5492c 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -34,7 +34,15 @@ function jqClearData(element) {
}
function JQLite(element) {
- this[0] = element;
+ if (element.length && element.item) {
+ for(var i=0; i < element.length; i++) {
+ this[i] = element[i];
+ }
+ this.length = element.length;
+ } else {
+ this[0] = element;
+ this.length = 1;
+ }
}
JQLite.prototype = {
@@ -111,7 +119,11 @@ JQLite.prototype = {
},
append: function(node) {
- this[0].appendChild(jqLite(node)[0]);
+ var self = this[0];
+ node = jqLite(node);
+ foreach(node, function(child){
+ self.appendChild(child);
+ });
},
remove: function() {