Comparing version 1.3.0 to 1.3.1
@@ -30,6 +30,8 @@ var bel = require('bel') // turns template tag into DOM elements | ||
// copy values for form elements | ||
if ((f.nodeName === 'INPUT' && f.type !== 'file') || f.nodeName === 'TEXTAREA' || f.nodeName === 'SELECT') { | ||
if ((f.nodeName === 'INPUT' && f.type !== 'file') || f.nodeName === 'SELECT') { | ||
if (t.getAttribute('value') === null) t.value = f.value | ||
} else if (f.nodeName === 'TEXTAREA') { | ||
if (t.getAttribute('value') === null) f.value = t.value | ||
} | ||
} | ||
} |
{ | ||
"name": "yo-yo", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "A tiny library for building modular UI components using DOM diffing and ES6 tagged template literals", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
10
test.js
@@ -48,1 +48,11 @@ /*global Event*/ | ||
}) | ||
test('textarea values get copied', function (t) { | ||
t.plan(1) | ||
function textarea (val) { | ||
return yo`<textarea>${val}</textarea>` | ||
} | ||
var el = textarea('foo') | ||
yo.update(el, textarea('bar')) | ||
t.equal(el.value, 'bar') | ||
}) |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
45181
141
0