vdom-virtualize
Advanced tools
Comparing version 1.0.6 to 2.0.0
25
index.js
@@ -39,25 +39,2 @@ /*! | ||
createVNode.fromHTML = function(html, key) { | ||
var rootNode = null; | ||
try { | ||
// Everything except iOS 7 Safari, IE 8/9, Andriod Browser 4.1/4.3 | ||
var parser = new DOMParser(); | ||
var doc = parser.parseFromString(html, 'text/html'); | ||
rootNode = doc.documentElement; | ||
} catch(e) { | ||
// Old browsers | ||
var ifr = document.createElement('iframe'); | ||
ifr.setAttribute('data-content', html); | ||
ifr.src = 'javascript: window.frameElement.getAttribute("data-content");'; | ||
document.head.appendChild(ifr); | ||
rootNode = ifr.contentDocument.documentElement; | ||
setTimeout(function() { | ||
ifr.remove(); // Garbage collection | ||
}, 0); | ||
} | ||
return createVNode(rootNode, key); | ||
}; | ||
function createFromTextNode(tNode) { | ||
@@ -266,2 +243,2 @@ return new VText(tNode.nodeValue) | ||
'class': 'className' | ||
} | ||
} |
{ | ||
"name": "vdom-virtualize", | ||
"version": "1.0.6", | ||
"description": "Virtulize any DOM node and turn it into a virtual-dom node.", | ||
"version": "2.0.0", | ||
"description": "Virtualize any DOM node and turn it into a virtual-dom node.", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "dependencies": {}, |
# vdom-virtualize | ||
**New in v2.0:** removed support for virtualize.fromHTML -- doing this right and supporting all platforms is a job for [another library](https://github.com/TimBeyer/html-to-vdom). | ||
**New in v1.0:** vdom-virtualize now supports comments and does now use peerDependencies to depend on virtual-dom. | ||
@@ -4,0 +5,0 @@ |
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
19
8217
227