elements-lite
Advanced tools
Comparing version 0.1.12 to 0.1.13
@@ -5,3 +5,3 @@ | ||
/* | ||
* @version 0.1.12 | ||
* @version 0.1.13 | ||
* @author Lauri Rooden - https://github.com/litejs/elements-lite | ||
@@ -26,3 +26,4 @@ * @license MIT License - http://lauri.rooden.ee/mit-license.txt | ||
function El(name, args) { | ||
var el, pre = {} | ||
var el | ||
, pre = {} | ||
name = name.replace(el_re, function(_, o, s, val) { | ||
@@ -32,3 +33,4 @@ pre[ | ||
o == "#" ? "id" : | ||
s ] = val || s | ||
s | ||
] = val || s | ||
return "" | ||
@@ -85,3 +87,8 @@ }) || "div" | ||
for (var len = e.length, i = 0, f = doc.createDocumentFragment(); i<len;) t.append.call(f, e[i++]); | ||
for ( | ||
var len = e.length | ||
, i = 0 | ||
, f = doc.createDocumentFragment(); | ||
i < len | ||
; ) t.append.call(f, e[i++]); | ||
e = f | ||
@@ -228,4 +235,3 @@ } | ||
, els = this.getElementsByTagName(tag) | ||
, fn = rules.join("&&").fn() | ||
, src = rules.join("&&") | ||
, fn = Function("_", "return " + rules.join("&&")) | ||
@@ -232,0 +238,0 @@ while (el = els[i++]) { |
@@ -5,3 +5,3 @@ !function(m,f,g){function e(a,b){var d,c={};a=a.replace(n,function(a,b,d,e){c["."==b?(b="class",c[b]&&(d=c[b]+" "+d),b):"#"==b?"id":d]=e||d;return""})||"div";d=(h[a]||(h[a]=f.createElement(a))).cloneNode(!0).set(c);return k[a]&&k[a](d,b)||d.set(b)}function l(a,b,d){if(a)for(d in b=e[g],b)a[d]=b[d];return a}var h={},k={},c=(m.HTMLElement||m.Element||e)[g],n=/([.#:[])([-\w]+)(?:=([-\w]+)])?]?/g;c.append=function(a,b){if(a){if("string"==typeof a||"number"==typeof a)a=e.text(a);else if(!("nodeType"in | ||
this.empty();return this};c.on=function(a,b){Event.add(this,a,b);return this};c.non=function(a,b){Event.remove(this,a,b);return this};c.set=function(a){var b=typeof a,d;if(a)if("string"==b||"number"==b||a.nodeType||"length"in a)this.append(a);else for(b in a)d=a[b],"class"==b?this.addClass(d):"string"==typeof d?(this.setAttribute(b,d),"name"==b&&"\v"=="v"&&this.mergeAttributes(f.createElement("<INPUT name='"+b+"'/>"),!1)):d?this[b]=d:this.removeAttribute(b);return this};c._find=function(a){var b= | ||
0,d=["_"];a=a.replace(n,function(a,b,c,e){d.push("."==b?"(' '+_.className+' ').indexOf(' "+c+" ')>-1":"#"==b?"_.id=='"+c+"'":"_.getAttribute('"+c+"')"+(e?"=='"+e+"'":""));return""})||"*";var c=this.getElementsByTagName(a),e=d.join("&&").fn();for(d.join("&&");a=c[b++];)if(e(a))return a.to?a:l(a)};c.find=f.querySelector?function(a){return this.querySelector(a)}:c._find;if(c===e[g]){var p=f.createElement;f.createElement=function(a){return l(p(a))};l(f.body)}e[g]=c;e.get=function(a){"string"==typeof a&& | ||
0,d=["_"];a=a.replace(n,function(a,b,c,e){d.push("."==b?"(' '+_.className+' ').indexOf(' "+c+" ')>-1":"#"==b?"_.id=='"+c+"'":"_.getAttribute('"+c+"')"+(e?"=='"+e+"'":""));return""})||"*";for(var c=this.getElementsByTagName(a),e=Function("_","return "+d.join("&&"));a=c[b++];)if(e(a))return a.to?a:l(a)};c.find=f.querySelector?function(a){return this.querySelector(a)}:c._find;if(c===e[g]){var p=f.createElement;f.createElement=function(a){return l(p(a))};l(f.body)}e[g]=c;e.get=function(a){"string"==typeof a&& | ||
(a=f.getElementById(a));return a&&a.to?a:l(a)};e.cache=function(a,b,c){h[a]="string"==typeof b?e(b):b;c&&(k[a]=c)};e.cache.el=h;e.cache.fn=k;e.text=function(a){return f.createTextNode(a)};m.El=e}(this,document,"prototype"); |
@@ -5,3 +5,3 @@ | ||
/* | ||
* @version 0.1.12 | ||
* @version 0.1.13 | ||
* @author Lauri Rooden - https://github.com/litejs/elements-lite | ||
@@ -8,0 +8,0 @@ * @license MIT License - http://lauri.rooden.ee/mit-license.txt |
{ | ||
"name": "elements-lite", | ||
"version": "0.1.12", | ||
"version": "0.1.13", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "DOM buildel for browser", |
@@ -6,3 +6,3 @@ | ||
@version 0.1.12 | ||
@version 0.1.13 | ||
@date 2013-10-15 | ||
@@ -17,3 +17,3 @@ @stability 1 - Experimental | ||
Download [compressed][1] | ||
(2771 bytes, 1229 bytes gzipped) | ||
(2777 bytes, 1230 bytes gzipped) | ||
or [uncompressed][2] source. | ||
@@ -20,0 +20,0 @@ |
@@ -5,3 +5,3 @@ | ||
/* | ||
* @version 0.1.12 | ||
* @version 0.1.13 | ||
* @author Lauri Rooden - https://github.com/litejs/elements-lite | ||
@@ -8,0 +8,0 @@ * @license MIT License - http://lauri.rooden.ee/mit-license.txt |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36867
771