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

can-attribute-observable

Package Overview
Dependencies
Maintainers
8
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.4 to 1.2.5

.npmignore

30

behaviors.js

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

var global = require("can-globals/global/global")();
var setData = require("can-dom-data-state");
var setData = require("can-dom-data");
var domEvents = require("can-dom-events");

@@ -58,3 +58,3 @@ var domMutate = require("can-dom-mutate");

setupMO = function(el, callback){
var attrMO = setData.get.call(el, "attrMO");
var attrMO = setData.get(el, "attrMO");
if(!attrMO) {

@@ -71,6 +71,6 @@ var onMutation = function(){

});
setData.set.call(el, "attrMO", observer);
setData.set(el, "attrMO", observer);
} else {
setData.set.call(el, "attrMO", true);
setData.set.call(el, "canBindingCallback", {onMutation: onMutation});
setData.set(el, "attrMO", true);
setData.set(el, "canBindingCallback", {onMutation: onMutation});
}

@@ -134,3 +134,3 @@ }

setChildOptionsOnChange = function(select, aEL){
var handler = setData.get.call(select, "attrSetChildOptions");
var handler = setData.get(select, "attrSetChildOptions");
if(handler) {

@@ -142,6 +142,6 @@ return Function.prototype;

};
setData.set.call(select, "attrSetChildOptions", handler);
setData.set(select, "attrSetChildOptions", handler);
aEL.call(select, "change", handler);
return function(rEL){
setData.clean.call(select, "attrSetChildOptions");
setData.clean(select, "attrSetChildOptions");
rEL.call(select, "change", handler);

@@ -299,3 +299,3 @@ };

val = !!val;
setData.set.call(this, "lastSetValue", val);
setData.set(this, "lastSetValue", val);
this.selected = val;

@@ -309,3 +309,3 @@ },

var curVal = option.selected;
lastVal = setData.get.call(option, "lastSetValue") || lastVal;
lastVal = setData.get(option, "lastSetValue") || lastVal;
if(curVal !== lastVal) {

@@ -371,3 +371,3 @@ lastVal = curVal;

if(nodeName === "select") {
setData.set.call(this, "attrValueLastVal", value);
setData.set(this, "attrValueLastVal", value);
//If it's null then special case

@@ -388,3 +388,3 @@ setChildOptions(this, value === null ? value : this.value);

setupMO(this, function(){
var value = setData.get.call(this, "attrValueLastVal");
var value = setData.get(this, "attrValueLastVal");
attr.set(this, "value", value);

@@ -410,3 +410,3 @@ domEvents.dispatch(this, "change");

// store new DOM state
setData.set.call(this, "stickyValues", attr.get(this,"values") );
setData.set(this, "stickyValues", attr.get(this,"values") );

@@ -418,3 +418,3 @@ // MO handler is only set up **ONCE**

// Get the previous sticky state
var previousValues = setData.get.call(this,
var previousValues = setData.get(this,
"stickyValues");

@@ -426,3 +426,3 @@

// Get the new result after trying to maintain the sticky state
var currentValues = setData.get.call(this,
var currentValues = setData.get(this,
"stickyValues");

@@ -429,0 +429,0 @@

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

@@ -30,3 +30,3 @@ "main": "can-attribute-observable",

"steal-qunit": "^1.0.1",
"testee": "^0.8.0"
"testee": "^0.9.1"
},

@@ -36,3 +36,3 @@ "dependencies": {

"can-diff": "^1.0.1",
"can-dom-data-state": "^1.0.1",
"can-dom-data": "^1.0.1",
"can-dom-events": "^1.1.2",

@@ -39,0 +39,0 @@ "can-dom-mutate": "^1.0.3",

@@ -5,3 +5,3 @@ var globals = require("can-globals");

var domMutateNode = require("can-dom-mutate/node");
var domData = require("can-dom-data-state");
var domData = require("can-dom-data");
var makeDocument = require("can-vdom/make-document/make-document");

@@ -40,3 +40,3 @@ var QUnit = require("steal-qunit");

while (fixture && fixture.hasChildNodes()) {
domData.delete.call(fixture.lastChild);
domData.delete(fixture.lastChild);
fixture.removeChild(fixture.lastChild);

@@ -43,0 +43,0 @@ }

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