aboutsummaryrefslogtreecommitdiffstats
path: root/src/Angular.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/Angular.js
parent843bd355d25ebf2369aec79f98cb6704d38497e9 (diff)
downloadangular.js-2637d4e90c8a43436d21a4b9e790b00ae461c438.tar.bz2
removed Meta and allowed binding of HTML
Diffstat (limited to 'src/Angular.js')
-rw-r--r--src/Angular.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/Angular.js b/src/Angular.js
index 11ebc4bc..d60e1b85 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -86,9 +86,12 @@ function jqLiteWrap(element) {
if (isString(element)) {
var div = document.createElement('div');
div.innerHTML = element;
- element = div.childNodes[0];
+ element = new JQLite(div.childNodes);
+ } else if (element instanceof JQLite) {
+ } else if (isElement(element)) {
+ element = new JQLite(element);
}
- return element instanceof JQLite ? element : new JQLite(element);
+ return element;
}
function isUndefined(value){ return typeof value == 'undefined'; }
function isDefined(value){ return typeof value != 'undefined'; }
@@ -102,6 +105,10 @@ function lowercase(value){ return isString(value) ? value.toLowerCase() : value;
function uppercase(value){ return isString(value) ? value.toUpperCase() : value; }
function trim(value) { return isString(value) ? value.replace(/^\s*/, '').replace(/\s*$/, '') : value; }
function nodeName(element) { return (element[0] || element).nodeName; }
+function isElement(node) {
+ if (node && node[0]) node = node[0];
+ return node && node.nodeName;
+}
function isVisible(element) {
var rect = element[0].getBoundingClientRect();
@@ -185,14 +192,6 @@ function consoleLog(level, objs) {
consoleNode.appendChild(log);
}
-function isNode(inp) {
- return inp &&
- inp.tagName &&
- inp.nodeName &&
- inp.ownerDocument &&
- inp.removeAttribute;
-}
-
function isLeafNode (node) {
if (node) {
switch (node.nodeName) {