Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

can-attribute-observable

Package Overview
Dependencies
Maintainers
6
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-attribute-observable - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

16

behaviors-test.js

@@ -151,2 +151,18 @@ var testHelpers = require("../test/helpers");

});
testIfRealDocument("setting .value on a textarea to undefined or null makes value empty string (28)", function(assert){
var textarea = document.createElement("textarea");
var ta = this.fixture;
ta.appendChild(textarea);
var obs = new AttributeObservable(textarea, "value");
obs.set('something');
assert.equal(obs.get(), "something", "correct string value");
obs.set(null);
assert.equal(obs.get(), "", "null handled correctly");
obs.set(undefined);
assert.equal(obs.get(), "", "undefined handled correctly");
});
});

2

behaviors.js

@@ -353,3 +353,3 @@ 'use strict';

var nodeName = this.nodeName.toLowerCase();
if(nodeName === "input") {
if(nodeName === "input" || nodeName === "textarea") {
// Do some input types support non string values?

@@ -356,0 +356,0 @@ value = toString(value);

{
"name": "can-attribute-observable",
"version": "1.2.3",
"version": "1.2.4",
"description": "Create observables from HTML attributes.",

@@ -5,0 +5,0 @@ "main": "can-attribute-observable",

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