lemonadejs
Advanced tools
Comparing version 1.6.1 to 1.7.0
@@ -130,3 +130,3 @@ /** | ||
*/ | ||
var obj = function(t, self) { | ||
var obj = function(t, self, ext) { | ||
// Self | ||
@@ -160,3 +160,3 @@ if (! self) { | ||
// Parse the content | ||
parse(div, self); | ||
parse(div, self, ext); | ||
// Share self | ||
@@ -299,3 +299,3 @@ div.self = self; | ||
var parse = function(element, self) { | ||
var parse = function(element, self, ext) { | ||
// Attributes | ||
@@ -382,3 +382,3 @@ var tmp = null; | ||
for (var i = 0; i < element.children.length; i++) { | ||
parse(element.children[i], self); | ||
parse(element.children[i], self, ext); | ||
} | ||
@@ -395,8 +395,10 @@ } else { | ||
// TODO: Subelements | ||
/*if (element.constructor == HTMLUnknownElement) { | ||
// Extensions | ||
if (ext && element.constructor == HTMLUnknownElement) { | ||
// Method name | ||
var m = element.tagName; | ||
// Custom uccase | ||
m = m.charAt(0).toUpperCase() + m.slice(1).toLowerCase(); | ||
m = eval(m); | ||
if (typeof(m) == 'function') { | ||
// Verify scope in the declared extensions | ||
if (typeof(ext[m]) == 'function') { | ||
if (element.getAttribute('extended') == 'true') { | ||
@@ -407,10 +409,10 @@ var e = self; | ||
} | ||
// Options | ||
for (var i = 0; i < element.attributes.length; i++) { | ||
e[element.attributes[i].name] = element.attributes[i].value; | ||
} | ||
L.render(m, element, e); | ||
// Render | ||
L.render(ext[m], element, e); | ||
} | ||
}*/ | ||
} | ||
} | ||
@@ -417,0 +419,0 @@ |
{ | ||
"name": "lemonadejs", | ||
"title": "Micro two-way binding and hook JavaScript vanilla library.", | ||
"description": "Lemonade is a lightweight, micro vanilla javascript library to create quick and reusable JS components without dependencies.", | ||
"title": "Micro reactive, two-way binding and hooks JavaScript vanilla library.", | ||
"description": "Lemonade is a lightweight, micro reactive vanilla javascript library to create quick and reusable JS components without dependencies.", | ||
"author": { | ||
@@ -10,2 +10,3 @@ "name": "Contact <contact@lemonadejs.net>", | ||
"keywords": [ | ||
"reactive", | ||
"two-way binding", | ||
@@ -17,3 +18,3 @@ "hooks", | ||
"main": "dist/lemonade.js", | ||
"version": "1.6.1" | ||
"version": "1.7.0" | ||
} |
18476
6
418