remixml-dom
Advanced tools
Comparing version 1.0.0 to 4.0.0
{ | ||
"name": "remixml-dom", | ||
"version": "1.0.0", | ||
"version": "4.0.0", | ||
"description": "Remixml component that renders to DOM in browsers", | ||
@@ -5,0 +5,0 @@ "main": "remixml-dom.min.js", |
@@ -9,2 +9,4 @@ <h1>Remixml to DOM rendering</h1> | ||
Uses the regular Javascript DOM-API. | ||
## Requirements | ||
@@ -16,7 +18,7 @@ | ||
- `Remixmldom.abstract2dom(abstract)`<br /> | ||
Converts a DOM-abstract into DOM nodes. | ||
- `Remixmldom.parse(template, context, flags=)`<br /> | ||
`template` can either be direct remixml source, or a precompiled object | ||
from `Remixml.compile`. Returns DOM nodes. | ||
- `Remixmldom.abstract2dom(abstract, node?)`<br /> | ||
Converts a DOM `abstract` into DOM nodes. If the optional `node` argument | ||
is specified, it replaces the children of `node` with the content | ||
described in DOM `abstract`. Returns `node` if specified, or the new | ||
nodes. | ||
@@ -23,0 +25,0 @@ ## References |
@@ -22,6 +22,12 @@ /** @license | ||
const O = Object; | ||
const D = typeof document == "object" ? document : null; | ||
const D = document; | ||
var g = | ||
{ "abstract2dom": abstract2dom, | ||
{ "abstract2dom": | ||
function /** !Node */(/** !Array */ tpl, /** !Node= */ node) | ||
{ var /** !Node */ newnodes = abstract2dom(tpl); | ||
if (node) | ||
node.appendChild(newnodes), newnodes = node; | ||
return newnodes; | ||
} | ||
}; | ||
@@ -40,6 +46,4 @@ | ||
const /** Node */ txta = newel("textarea"); | ||
const /** !Node */ txta = newel("textarea"); | ||
// For use in Javascript Remixml | ||
// Converts the abstract presentation into a live DOM Node structure | ||
function /** !Node */ abstract2dom(/** !Array */ vdom) | ||
@@ -46,0 +50,0 @@ { var /** !Node */ parent; |
@@ -29,6 +29,12 @@ /** @license | ||
const O = Object; | ||
const D = typeof document == "object" ? document : null; | ||
const D = document; | ||
var g = | ||
{ "abstract2dom": abstract2dom, | ||
{ "abstract2dom": | ||
function /** !Node */(/** !Array */ tpl, /** !Node= */ node) | ||
{ var /** !Node */ newnodes = abstract2dom(tpl); | ||
if (node) | ||
node.appendChild(newnodes), newnodes = node; | ||
return newnodes; | ||
} | ||
}; | ||
@@ -47,6 +53,4 @@ | ||
const /** Node */ txta = newel("textarea"); | ||
const /** !Node */ txta = newel("textarea"); | ||
// For use in Javascript Remixml | ||
// Converts the abstract presentation into a live DOM Node structure | ||
function /** !Node */ abstract2dom(/** !Array */ vdom) | ||
@@ -53,0 +57,0 @@ { var /** !Node */ parent; |
@@ -10,4 +10,4 @@ (function(){"use strict"; | ||
function m(f){var d=0;return function(){return d<f.length?{done:!1,value:f[d++]}:{done:!0}}} | ||
(function(){function f(c){var a=c[""];switch(a){case "!":return g.createComment(c[0]);case 1:var e=g.createDocumentFragment();break;default:e=g.createElement(a);var b=d.keys(c).splice(c.length);b=(a="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator])?a.call(b):{next:m(b)};for(a=b.next();!a.done;a=b.next())switch(a=a.value,a[0]){default:var h=c[a];null!=h&&"object"!==typeof h&&e.setAttribute(a,h);case "_":case void 0:}}for(a=0;void 0!==(b=c[a++]);)e.appendChild(b[""]?f(b):0>b.indexOf("&")? | ||
g.createTextNode(b):(l.innerHTML=b,l.firstChild));return e}var d=Object,g="object"==typeof document?document:null,k={abstract2dom:f};d.assign||d.defineProperty(d,"assign",{value:function(c,a,e){if(a)for(e in a)c[e]=a[e];return c}});var l=g.createElement("textarea");"function"==typeof define&&define.amd?define("remixml-dom",k):"object"==typeof exports?d.assign(exports,k):window.RemixmlDOM=k}).call(this); | ||
(function(){function f(b){var a=b[""];switch(a){case "!":return g.createComment(b[0]);case 1:var e=g.createDocumentFragment();break;default:e=g.createElement(a);var c=d.keys(b).splice(b.length);c=(a="undefined"!=typeof Symbol&&Symbol.iterator&&c[Symbol.iterator])?a.call(c):{next:m(c)};for(a=c.next();!a.done;a=c.next())switch(a=a.value,a[0]){default:var h=b[a];null!=h&&"object"!==typeof h&&e.setAttribute(a,h);case "_":case void 0:}}for(a=0;void 0!==(c=b[a++]);)e.appendChild(c[""]?f(c):0>c.indexOf("&")? | ||
g.createTextNode(c):(l.innerHTML=c,l.firstChild));return e}var d=Object,g=document,k={abstract2dom:function(b,a){b=f(b);a&&(a.appendChild(b),b=a);return b}};d.assign||d.defineProperty(d,"assign",{value:function(b,a,e){if(a)for(e in a)b[e]=a[e];return b}});var l=g.createElement("textarea");"function"==typeof define&&define.amd?define("remixml-dom",k):"object"==typeof exports?d.assign(exports,k):window.RemixmlDOM=k}).call(this); | ||
}).call(this); |
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
19492
165
31