Socket
Socket
Sign inDemoInstall

morphdom

Package Overview
Dependencies
0
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 1.1.0

.cache/lasso/default/198215032/read/14/09e0942cf84414ab8f752b6d2c0285

4

CHANGELOG.md

@@ -8,2 +8,6 @@ Changelog

### 1.1.0
- Fixes [#32](https://github.com/patrick-steele-idem/morphdom/issues/32) - Support for IE7+
### 1.0.4

@@ -10,0 +14,0 @@

@@ -5,2 +5,17 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.morphdom = f()}})(function(){var define,module,exports;module={exports:(exports={})};

var testEl = document.body || document.createElement('div');
// Fixes https://github.com/patrick-steele-idem/morphdom/issues/32 (IE7+ support)
// <=IE7 does not support el.hasAttribute(name)
var hasAttribute;
if (testEl.hasAttribute) {
hasAttribute = function hasAttribute(el, name) {
return el.hasAttribute(name);
};
} else {
hasAttribute = function hasAttribute(el, name) {
return el.getAttributeNode(name);
};
}
function empty(o) {

@@ -16,3 +31,3 @@ for (var k in o) {

function toElement(str) {
if (!range) {
if (!range && document.createRange) {
range = document.createRange();

@@ -23,3 +38,3 @@ range.selectNode(document.body);

var fragment;
if (range.createContextualFragment) {
if (range && range.createContextualFragment) {
fragment = range.createContextualFragment(str);

@@ -60,7 +75,7 @@ } else {

if (!toEl.hasAttribute('checked')) {
if (!hasAttribute(toEl, 'checked')) {
fromEl.removeAttribute('checked');
}
if (!toEl.hasAttribute('value')) {
if (!hasAttribute(toEl, 'value')) {
fromEl.removeAttribute('value');

@@ -67,0 +82,0 @@ }

// Create a range object for efficently rendering strings to elements.
var range;
var testEl = document.body || document.createElement('div');
// Fixes https://github.com/patrick-steele-idem/morphdom/issues/32 (IE7+ support)
// <=IE7 does not support el.hasAttribute(name)
var hasAttribute;
if (testEl.hasAttribute) {
hasAttribute = function hasAttribute(el, name) {
return el.hasAttribute(name);
};
} else {
hasAttribute = function hasAttribute(el, name) {
return el.getAttributeNode(name);
};
}
function empty(o) {

@@ -14,3 +29,3 @@ for (var k in o) {

function toElement(str) {
if (!range) {
if (!range && document.createRange) {
range = document.createRange();

@@ -21,3 +36,3 @@ range.selectNode(document.body);

var fragment;
if (range.createContextualFragment) {
if (range && range.createContextualFragment) {
fragment = range.createContextualFragment(str);

@@ -58,7 +73,7 @@ } else {

if (!toEl.hasAttribute('checked')) {
if (!hasAttribute(toEl, 'checked')) {
fromEl.removeAttribute('checked');
}
if (!toEl.hasAttribute('value')) {
if (!hasAttribute(toEl, 'value')) {
fromEl.removeAttribute('value');

@@ -65,0 +80,0 @@ }

2

package.json

@@ -38,3 +38,3 @@ {

"dependencies": {},
"version": "1.0.4"
"version": "1.1.0"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc