transparency
Advanced tools
Comparing version 0.9.3 to 0.9.4
{ | ||
"name": "transparency", | ||
"version": "0.9.3", | ||
"version": "0.9.4", | ||
"main": "./dist/transparency.js" | ||
} |
/*! | ||
* transparency - v0.9.2 - 2013-02-22 | ||
* transparency - v0.9.3 - 2013-02-22 | ||
* https://github.com/leonidas/transparency | ||
@@ -389,5 +389,5 @@ * Copyright (c) 2013 Jarno Keskikangas <jarno.keskikangas@leonidasoy.fi>; Licensed MIT | ||
Attributes: {}, | ||
createAttribute: function(element, name, value) { | ||
createAttribute: function(element, name) { | ||
var Attr; | ||
Attr = AttributeFactory.Attributes[name] || (isBoolean(value) ? BooleanAttribute : Attribute); | ||
Attr = AttributeFactory.Attributes[name] || Attribute; | ||
return new Attr(element, name); | ||
@@ -415,5 +415,13 @@ } | ||
BooleanAttribute = (function(_super) { | ||
var BOOLEAN_ATTRIBUTES, name, _i, _len; | ||
__extends(BooleanAttribute, _super); | ||
BOOLEAN_ATTRIBUTES = ['hidden', 'async', 'defer', 'autofocus', 'formnovalidate', 'disabled', 'autofocus', 'formnovalidate', 'multiple', 'readonly', 'required', 'checked', 'scoped', 'reversed', 'selected', 'loop', 'muted', 'autoplay', 'controls', 'seamless', 'default', 'ismap', 'novalidate', 'open', 'typemustmatch', 'truespeed']; | ||
for (_i = 0, _len = BOOLEAN_ATTRIBUTES.length; _i < _len; _i++) { | ||
name = BOOLEAN_ATTRIBUTES[_i]; | ||
AttributeFactory.Attributes[name] = BooleanAttribute; | ||
} | ||
function BooleanAttribute(el, name) { | ||
@@ -569,7 +577,10 @@ this.el = el; | ||
attribute = (_base = this.attributes)[name] || (_base[name] = AttributeFactory.createAttribute(this.el, name, value)); | ||
return attribute.set(value); | ||
if (value != null) { | ||
attribute.set(value); | ||
} | ||
return attribute; | ||
}; | ||
Element.prototype.renderDirectives = function(model, index, attributes) { | ||
var directive, name, value, _ref, _results; | ||
var directive, name, value, _results; | ||
_results = []; | ||
@@ -585,3 +596,3 @@ for (name in attributes) { | ||
index: index, | ||
value: ((_ref = this.attributes[name]) != null ? _ref.templateValue : void 0) || '' | ||
value: this.attr(name).templateValue | ||
}); | ||
@@ -588,0 +599,0 @@ if (value != null) { |
/*! | ||
* transparency - v0.9.2 - 2013-02-22 | ||
* transparency - v0.9.3 - 2013-02-22 | ||
* https://github.com/leonidas/transparency | ||
* Copyright (c) 2013 Jarno Keskikangas <jarno.keskikangas@leonidasoy.fi>; Licensed MIT | ||
*/ | ||
(function(){var t,e,n,r,i,o,u,s,l,h,a,c,p,f,d,m,y,v,g,b,_,N,x,C,A,E,T,j,w,V,D,S,L,k,Q,B,M,H,O=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},P={}.hasOwnProperty,Z=function(t,e){function n(){this.constructor=t}for(var r in e)P.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};b=function(t){return function(e){return function(){return t.apply(this,arguments),e.apply(this,arguments)}}},g=function(t){return function(e){return function(){return e.apply(this,arguments),t.apply(this,arguments)}}},_=g(function(){return this}),B=function(t){return"undefined"!=typeof jQuery&&null!==jQuery||"undefined"!=typeof Zepto&&null!==Zepto?function(){return t(arguments)}(jQuery||Zepto):void 0},E=function(t){var e,n;for(n=[],e=t.firstChild;e;)n.push(e),e=e.nextSibling;return n},T=function(t){var e;return e=[],H(t,e),e},H=function(t,e){var n,r;for(n=t.firstChild,r=[];n;)n.nodeType===u&&(e.push(new l.createElement(n)),H(n,e)),r.push(n=n.nextSibling);return r},u=1,d=3,j=function(){return"<:nav></:nav>"!==document.createElement("nav").cloneNode(!0).outerHTML},N="undefined"==typeof document||null===document||j()?function(t){return t.cloneNode(!0)}:function(t){var e,n,r,i,o;if(e=y.clone(t),e.nodeType===u)for(e.removeAttribute(A),o=e.getElementsByTagName("*"),r=0,i=o.length;i>r;r++)n=o[r],n.removeAttribute(A);return e},A="transparency",C=function(t){return t[A]||(t[A]={})},Q=function(){},x=function(){return console.log(arguments)},k=Q,M=Object.prototype.toString,w=Array.isArray||function(t){return"[object Array]"===M.call(t)},D=function(t){return"[object Date]"===M.call(t)},S=function(t){return t.nodeType===u},L=function(t){var e;return e=typeof t,"object"!==e&&"function"!==e||D(t)},V=function(t){return t===!0||t===!1},y=this.Transparency={},y.render=function(t,e,n,r){var i;return null==e&&(e=[]),null==n&&(n={}),null==r&&(r={}),k=r.debug&&console?x:Q,k("Transparency.render:",t,e,n,r),t?(w(e)||(e=[e]),t=(i=C(t)).context||(i.context=new o(t)),t.render(e,n,r).el):void 0},y.jQueryPlugin=_(function(t,e,n){var r,i,o,u;for(u=[],i=0,o=this.length;o>i;i++)r=this[i],u.push(y.render(r,t,e,n));return u}),y.matcher=function(t,e){return t.el.id===e||O.call(t.classNames,e)>=0||t.el.name===e||t.el.getAttribute("data-bind")===e},y.clone=B(function(){return function(t){return $(t).clone()[0]}}),B(function(){return $.fn.render=y.jQueryPlugin}),("undefined"!=typeof define&&null!==define?define.amd:void 0)&&define(function(){return y}),o=function(){function t(t){this.el=t,this.template=N(this.el),this.instances=[new c(this.el)],this.instanceCache=[]}var e,n;return n=_(function(){return this.parent=this.el.parentNode,this.parent?(this.nextSibling=this.el.nextSibling,this.parent.removeChild(this.el)):void 0}),e=_(function(){return this.parent?this.nextSibling?this.parent.insertBefore(this.el,this.nextSibling):this.parent.appendChild(this.el):void 0}),t.prototype.render=b(n)(g(e)(_(function(t,e,n){for(var r,i,o,u,s,l,h;t.length<this.instances.length;)this.instanceCache.push(this.instances.pop().remove());for(h=[],i=s=0,l=t.length;l>s;i=++s)u=t[i],(o=this.instances[i])||(o=this.instanceCache.pop()||new c(N(this.template)),this.instances.push(o.appendTo(this.el))),r=[],h.push(o.prepare(u,r).renderValues(u,r).renderDirectives(u,i,e).renderChildren(u,r,e,n));return h}))),t}(),c=function(){function t(t){this.queryCache={},this.childNodes=E(t),this.elements=T(t)}return t.prototype.remove=_(function(){var t,e,n,r,i;for(r=this.childNodes,i=[],e=0,n=r.length;n>e;e++)t=r[e],i.push(t.parentNode.removeChild(t));return i}),t.prototype.appendTo=_(function(t){var e,n,r,i,o;for(i=this.childNodes,o=[],n=0,r=i.length;r>n;n++)e=i[n],o.push(t.appendChild(e));return o}),t.prototype.prepare=_(function(t){var e,n,r,i,o;for(i=this.elements,o=[],n=0,r=i.length;r>n;n++)e=i[n],e.reset(),o.push(C(e.el).model=t);return o}),t.prototype.renderValues=_(function(t,e){var n,r,i,o;if(S(t)&&(n=this.elements[0]))return n.empty().el.appendChild(t);if("object"==typeof t){o=[];for(r in t)P.call(t,r)&&(i=t[r],null!=i&&(L(i)?o.push(function(){var t,e,o,u;for(o=this.matchingElements(r),u=[],t=0,e=o.length;e>t;t++)n=o[t],u.push(n.render(i));return u}.call(this)):"object"==typeof i?o.push(e.push(r)):o.push(void 0)));return o}}),t.prototype.renderDirectives=_(function(t,e,n){var r,i,o,u;u=[];for(o in n)P.call(n,o)&&(r=n[o],"object"==typeof r&&("object"!=typeof t&&(t={value:t}),u.push(function(){var n,u,s,l;for(s=this.matchingElements(o),l=[],n=0,u=s.length;u>n;n++)i=s[n],l.push(i.renderDirectives(t,e,r));return l}.call(this))));return u}),t.prototype.renderChildren=_(function(t,e,n,r){var i,o,u,s,l;for(l=[],u=0,s=e.length;s>u;u++)o=e[u],l.push(function(){var e,u,s,l;for(s=this.matchingElements(o),l=[],e=0,u=s.length;u>e;e++)i=s[e],l.push(y.render(i.el,t[o],n[o],r));return l}.call(this));return l}),t.prototype.matchingElements=function(t){var e,n,r;return n=(r=this.queryCache)[t]||(r[t]=function(){var n,r,i,o;for(i=this.elements,o=[],n=0,r=i.length;r>n;n++)e=i[n],y.matcher(e,t)&&o.push(e);return o}.call(this)),k("Matching elements for '"+t+"':",n),n},t}(),e={Attributes:{},createAttribute:function(r,i,o){var u;return u=e.Attributes[i]||(V(o)?n:t),new u(r,i)}},t=function(){function t(t,e){this.el=t,this.name=e,this.templateValue=this.el.getAttribute(this.name)||""}return t.prototype.set=function(t){return this.el[this.name]=t,this.el.setAttribute(this.name,""+t)},t}(),n=function(t){function e(t,e){this.el=t,this.name=e,this.templateValue=this.el.getAttribute(this.name)||!1}return Z(e,t),e.prototype.set=function(t){return this.el[this.name]=t,t?this.el.setAttribute(this.name,this.name):this.el.removeAttribute(this.name)},e}(t),m=function(t){function n(t,e){var n;this.el=t,this.name=e,this.templateValue=function(){var t,e,r,i;for(r=E(this.el),i=[],t=0,e=r.length;e>t;t++)n=r[t],n.nodeType===d&&i.push(n.nodeValue);return i}.call(this).join(""),(this.textNode=this.el.firstChild)?this.textNode.nodeType!==d&&(this.textNode=this.el.insertBefore(this.el.ownerDocument.createTextNode(""),this.textNode)):this.el.appendChild(this.textNode=this.el.ownerDocument.createTextNode(""))}return Z(n,t),e.Attributes.text=n,n.prototype.set=function(t){return this.textNode.nodeValue=t},n}(t),h=function(t){function n(t){n.__super__.constructor.call(this,t,"innerHTML"),this.childNodes=E(this.el)}return Z(n,t),e.Attributes.html=n,n.prototype.set=function(t){var e,n,r,i,o;for(this.el.innerHTML=t,i=this.childNodes,o=[],n=0,r=i.length;r>n;n++)e=i[n],o.push(this.el.appendChild(e));return o},n}(t),i=function(t){function n(t){n.__super__.constructor.call(this,t,"class")}return Z(n,t),e.Attributes["class"]=n,n}(t),l={Elements:{input:{}},createElement:function(t){var e,n;return e="input"===(n=t.nodeName.toLowerCase())?l.Elements[n][t.type.toLowerCase()]||a:l.Elements[n]||s,new e(t)}},s=function(){function t(t){this.el=t,this.attributes={},this.childNodes=E(this.el),this.nodeName=this.el.nodeName.toLowerCase(),this.classNames=this.el.className.split(" "),this.originalAttributes={}}return t.prototype.empty=_(function(){var t,e;for(e=[];t=this.el.firstChild;)e.push(this.el.removeChild(t));return e}),t.prototype.reset=function(){var t,e,n,r;n=this.attributes,r=[];for(e in n)t=n[e],r.push(t.set(t.templateValue));return r},t.prototype.render=function(t){return this.attr("text",t)},t.prototype.attr=function(t,n){var r,i;return r=(i=this.attributes)[t]||(i[t]=e.createAttribute(this.el,t,n)),r.set(n)},t.prototype.renderDirectives=function(t,e,n){var r,i,o,u,s;s=[];for(i in n)P.call(n,i)&&(r=n[i],"function"==typeof r&&(o=r.call(t,{element:this.el,index:e,value:(null!=(u=this.attributes[i])?u.templateValue:void 0)||""}),null!=o?s.push(this.attr(i,o)):s.push(void 0)));return s},t}(),f=function(t){function e(t){e.__super__.constructor.call(this,t),this.elements=T(t)}return Z(e,t),l.Elements.select=e,e.prototype.render=function(t){var e,n,r,i,o;for(t=""+t,i=this.elements,o=[],n=0,r=i.length;r>n;n++)e=i[n],"option"===e.nodeName&&o.push(e.attr("selected",e.el.value===t));return o},e}(s),v=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}var n,r,i,o;for(Z(e,t),n=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],i=0,o=n.length;o>i;i++)r=n[i],l.Elements[r]=e;return e.prototype.attr=function(t,n){return"text"!==t&&"html"!==t?e.__super__.attr.call(this,t,n):void 0},e}(s),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Z(e,t),e.prototype.render=function(t){return this.attr("value",t)},e}(v),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Z(e,t),l.Elements.input.checkbox=e,e.prototype.render=function(t){return this.attr("checked",Boolean(t))},e}(a),p=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Z(e,t),l.Elements.input.radio=e,e}(r)}).call(this); | ||
(function(){var t,e,n,r,i,o,u,s,l,a,h,c,p,f,d,m,y,v,g,b,_,N,x,C,A,E,T,j,w,V,D,S,k,L,Q,B,M,q,H=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},O={}.hasOwnProperty,P=function(t,e){function n(){this.constructor=t}for(var r in e)O.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};b=function(t){return function(e){return function(){return t.apply(this,arguments),e.apply(this,arguments)}}},g=function(t){return function(e){return function(){return e.apply(this,arguments),t.apply(this,arguments)}}},_=g(function(){return this}),B=function(t){return"undefined"!=typeof jQuery&&null!==jQuery||"undefined"!=typeof Zepto&&null!==Zepto?function(){return t(arguments)}(jQuery||Zepto):void 0},E=function(t){var e,n;for(n=[],e=t.firstChild;e;)n.push(e),e=e.nextSibling;return n},T=function(t){var e;return e=[],q(t,e),e},q=function(t,e){var n,r;for(n=t.firstChild,r=[];n;)n.nodeType===u&&(e.push(new l.createElement(n)),q(n,e)),r.push(n=n.nextSibling);return r},u=1,d=3,j=function(){return"<:nav></:nav>"!==document.createElement("nav").cloneNode(!0).outerHTML},N="undefined"==typeof document||null===document||j()?function(t){return t.cloneNode(!0)}:function(t){var e,n,r,i,o;if(e=y.clone(t),e.nodeType===u)for(e.removeAttribute(A),o=e.getElementsByTagName("*"),r=0,i=o.length;i>r;r++)n=o[r],n.removeAttribute(A);return e},A="transparency",C=function(t){return t[A]||(t[A]={})},Q=function(){},x=function(){return console.log(arguments)},L=Q,M=Object.prototype.toString,w=Array.isArray||function(t){return"[object Array]"===M.call(t)},D=function(t){return"[object Date]"===M.call(t)},S=function(t){return t.nodeType===u},k=function(t){var e;return e=typeof t,"object"!==e&&"function"!==e||D(t)},V=function(t){return t===!0||t===!1},y=this.Transparency={},y.render=function(t,e,n,r){var i;return null==e&&(e=[]),null==n&&(n={}),null==r&&(r={}),L=r.debug&&console?x:Q,L("Transparency.render:",t,e,n,r),t?(w(e)||(e=[e]),t=(i=C(t)).context||(i.context=new o(t)),t.render(e,n,r).el):void 0},y.jQueryPlugin=_(function(t,e,n){var r,i,o,u;for(u=[],i=0,o=this.length;o>i;i++)r=this[i],u.push(y.render(r,t,e,n));return u}),y.matcher=function(t,e){return t.el.id===e||H.call(t.classNames,e)>=0||t.el.name===e||t.el.getAttribute("data-bind")===e},y.clone=B(function(){return function(t){return $(t).clone()[0]}}),B(function(){return $.fn.render=y.jQueryPlugin}),("undefined"!=typeof define&&null!==define?define.amd:void 0)&&define(function(){return y}),o=function(){function t(t){this.el=t,this.template=N(this.el),this.instances=[new c(this.el)],this.instanceCache=[]}var e,n;return n=_(function(){return this.parent=this.el.parentNode,this.parent?(this.nextSibling=this.el.nextSibling,this.parent.removeChild(this.el)):void 0}),e=_(function(){return this.parent?this.nextSibling?this.parent.insertBefore(this.el,this.nextSibling):this.parent.appendChild(this.el):void 0}),t.prototype.render=b(n)(g(e)(_(function(t,e,n){for(var r,i,o,u,s,l,a;t.length<this.instances.length;)this.instanceCache.push(this.instances.pop().remove());for(a=[],i=s=0,l=t.length;l>s;i=++s)u=t[i],(o=this.instances[i])||(o=this.instanceCache.pop()||new c(N(this.template)),this.instances.push(o.appendTo(this.el))),r=[],a.push(o.prepare(u,r).renderValues(u,r).renderDirectives(u,i,e).renderChildren(u,r,e,n));return a}))),t}(),c=function(){function t(t){this.queryCache={},this.childNodes=E(t),this.elements=T(t)}return t.prototype.remove=_(function(){var t,e,n,r,i;for(r=this.childNodes,i=[],e=0,n=r.length;n>e;e++)t=r[e],i.push(t.parentNode.removeChild(t));return i}),t.prototype.appendTo=_(function(t){var e,n,r,i,o;for(i=this.childNodes,o=[],n=0,r=i.length;r>n;n++)e=i[n],o.push(t.appendChild(e));return o}),t.prototype.prepare=_(function(t){var e,n,r,i,o;for(i=this.elements,o=[],n=0,r=i.length;r>n;n++)e=i[n],e.reset(),o.push(C(e.el).model=t);return o}),t.prototype.renderValues=_(function(t,e){var n,r,i,o;if(S(t)&&(n=this.elements[0]))return n.empty().el.appendChild(t);if("object"==typeof t){o=[];for(r in t)O.call(t,r)&&(i=t[r],null!=i&&(k(i)?o.push(function(){var t,e,o,u;for(o=this.matchingElements(r),u=[],t=0,e=o.length;e>t;t++)n=o[t],u.push(n.render(i));return u}.call(this)):"object"==typeof i?o.push(e.push(r)):o.push(void 0)));return o}}),t.prototype.renderDirectives=_(function(t,e,n){var r,i,o,u;u=[];for(o in n)O.call(n,o)&&(r=n[o],"object"==typeof r&&("object"!=typeof t&&(t={value:t}),u.push(function(){var n,u,s,l;for(s=this.matchingElements(o),l=[],n=0,u=s.length;u>n;n++)i=s[n],l.push(i.renderDirectives(t,e,r));return l}.call(this))));return u}),t.prototype.renderChildren=_(function(t,e,n,r){var i,o,u,s,l;for(l=[],u=0,s=e.length;s>u;u++)o=e[u],l.push(function(){var e,u,s,l;for(s=this.matchingElements(o),l=[],e=0,u=s.length;u>e;e++)i=s[e],l.push(y.render(i.el,t[o],n[o],r));return l}.call(this));return l}),t.prototype.matchingElements=function(t){var e,n,r;return n=(r=this.queryCache)[t]||(r[t]=function(){var n,r,i,o;for(i=this.elements,o=[],n=0,r=i.length;r>n;n++)e=i[n],y.matcher(e,t)&&o.push(e);return o}.call(this)),L("Matching elements for '"+t+"':",n),n},t}(),e={Attributes:{},createAttribute:function(n,r){var i;return i=e.Attributes[r]||t,new i(n,r)}},t=function(){function t(t,e){this.el=t,this.name=e,this.templateValue=this.el.getAttribute(this.name)||""}return t.prototype.set=function(t){return this.el[this.name]=t,this.el.setAttribute(this.name,""+t)},t}(),n=function(t){function n(t,e){this.el=t,this.name=e,this.templateValue=this.el.getAttribute(this.name)||!1}var r,i,o,u;for(P(n,t),r=["hidden","async","defer","autofocus","formnovalidate","disabled","autofocus","formnovalidate","multiple","readonly","required","checked","scoped","reversed","selected","loop","muted","autoplay","controls","seamless","default","ismap","novalidate","open","typemustmatch","truespeed"],o=0,u=r.length;u>o;o++)i=r[o],e.Attributes[i]=n;return n.prototype.set=function(t){return this.el[this.name]=t,t?this.el.setAttribute(this.name,this.name):this.el.removeAttribute(this.name)},n}(t),m=function(t){function n(t,e){var n;this.el=t,this.name=e,this.templateValue=function(){var t,e,r,i;for(r=E(this.el),i=[],t=0,e=r.length;e>t;t++)n=r[t],n.nodeType===d&&i.push(n.nodeValue);return i}.call(this).join(""),(this.textNode=this.el.firstChild)?this.textNode.nodeType!==d&&(this.textNode=this.el.insertBefore(this.el.ownerDocument.createTextNode(""),this.textNode)):this.el.appendChild(this.textNode=this.el.ownerDocument.createTextNode(""))}return P(n,t),e.Attributes.text=n,n.prototype.set=function(t){return this.textNode.nodeValue=t},n}(t),a=function(t){function n(t){n.__super__.constructor.call(this,t,"innerHTML"),this.childNodes=E(this.el)}return P(n,t),e.Attributes.html=n,n.prototype.set=function(t){var e,n,r,i,o;for(this.el.innerHTML=t,i=this.childNodes,o=[],n=0,r=i.length;r>n;n++)e=i[n],o.push(this.el.appendChild(e));return o},n}(t),i=function(t){function n(t){n.__super__.constructor.call(this,t,"class")}return P(n,t),e.Attributes["class"]=n,n}(t),l={Elements:{input:{}},createElement:function(t){var e,n;return e="input"===(n=t.nodeName.toLowerCase())?l.Elements[n][t.type.toLowerCase()]||h:l.Elements[n]||s,new e(t)}},s=function(){function t(t){this.el=t,this.attributes={},this.childNodes=E(this.el),this.nodeName=this.el.nodeName.toLowerCase(),this.classNames=this.el.className.split(" "),this.originalAttributes={}}return t.prototype.empty=_(function(){var t,e;for(e=[];t=this.el.firstChild;)e.push(this.el.removeChild(t));return e}),t.prototype.reset=function(){var t,e,n,r;n=this.attributes,r=[];for(e in n)t=n[e],r.push(t.set(t.templateValue));return r},t.prototype.render=function(t){return this.attr("text",t)},t.prototype.attr=function(t,n){var r,i;return r=(i=this.attributes)[t]||(i[t]=e.createAttribute(this.el,t,n)),null!=n&&r.set(n),r},t.prototype.renderDirectives=function(t,e,n){var r,i,o,u;u=[];for(i in n)O.call(n,i)&&(r=n[i],"function"==typeof r&&(o=r.call(t,{element:this.el,index:e,value:this.attr(i).templateValue}),null!=o?u.push(this.attr(i,o)):u.push(void 0)));return u},t}(),f=function(t){function e(t){e.__super__.constructor.call(this,t),this.elements=T(t)}return P(e,t),l.Elements.select=e,e.prototype.render=function(t){var e,n,r,i,o;for(t=""+t,i=this.elements,o=[],n=0,r=i.length;r>n;n++)e=i[n],"option"===e.nodeName&&o.push(e.attr("selected",e.el.value===t));return o},e}(s),v=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}var n,r,i,o;for(P(e,t),n=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],i=0,o=n.length;o>i;i++)r=n[i],l.Elements[r]=e;return e.prototype.attr=function(t,n){return"text"!==t&&"html"!==t?e.__super__.attr.call(this,t,n):void 0},e}(s),h=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.render=function(t){return this.attr("value",t)},e}(v),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),l.Elements.input.checkbox=e,e.prototype.render=function(t){return this.attr("checked",Boolean(t))},e}(h),p=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),l.Elements.input.radio=e,e}(r)}).call(this); |
{ | ||
"name": "transparency", | ||
"version": "0.9.3", | ||
"version": "0.9.4", | ||
"main": "dist/transparency", | ||
@@ -5,0 +5,0 @@ "description": "Transparency is a minimal template engine for browsers. It maps JSON objects to DOM elements with zero configuration.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
4153245
21017