Socket
Socket
Sign inDemoInstall

morphdom

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

morphdom - npm Package Compare versions

Comparing version 0.1.10 to 0.1.11

19

lib/index.js

@@ -0,1 +1,16 @@

// Create a range object for efficently rendering strings to elements.
var range = document.createRange();
range.selectNode(document.body);
function toElement(str) {
var fragment;
if (range.createContextualFragment) {
fragment = range.createContextualFragment(str);
} else {
fragment = document.createElement('body');
fragment.innerHTML = str;
}
return fragment.childNodes[0];
}
var specialElHandlers = {

@@ -100,5 +115,3 @@ /**

if (typeof toNode === 'string') {
var newBodyEl = document.createElement('body');
newBodyEl.innerHTML = toNode;
toNode = newBodyEl.childNodes[0];
toNode = toElement(toNode);
}

@@ -105,0 +118,0 @@

2

package.json

@@ -36,3 +36,3 @@ {

"dependencies": {},
"version": "0.1.10"
"version": "0.1.11"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc