New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

can-stache-bindings

Package Overview
Dependencies
Maintainers
16
Versions
219
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-stache-bindings - npm Package Compare versions

Comparing version 4.10.8 to 4.10.9

.DS_Store

11

can-stache-bindings.js

@@ -52,3 +52,4 @@ "use strict";

scopeBindingStr = "scope",
viewModelOrAttributeBindingStr = "viewModelOrAttribute";
viewModelOrAttributeBindingStr = "viewModelOrAttribute",
viewModelSymbol = canSymbol.for("can.viewModel");

@@ -96,3 +97,3 @@ var throwOnlyOneTypeOfBindingError = function() {

var bindingCode = attributeName.substr(onMatchStr.length);
var viewModel = el && el[canSymbol.for('can.viewModel')];
var viewModel = el && el[viewModelSymbol];
var elUsed = startsWith.call(bindingCode, elMatchStr);

@@ -534,3 +535,3 @@ var vmUsed = startsWith.call(bindingCode, vmMatchStr);

!eventBindingData.bindingCode &&
el[canSymbol.for("can.viewModel")] &&
el[viewModelSymbol] &&
("on" + event) in el

@@ -557,3 +558,3 @@ ) {

var viewModel = canViewModel(el);
var viewModel = el[viewModelSymbol];

@@ -681,3 +682,3 @@ // expression.parse will read the attribute

viewModelOrAttribute: function(bindingData, bindingContext) {
var viewModel = bindingContext.element[canSymbol.for('can.viewModel')];
var viewModel = bindingContext.element[viewModelSymbol];

@@ -684,0 +685,0 @@ // if we have a viewModel, use it; otherwise, setup attribute binding

{
"name": "can-stache-bindings",
"version": "4.10.8",
"version": "4.10.9",
"description": "Default binding syntaxes for can-stache",

@@ -5,0 +5,0 @@ "homepage": "https://canjs.com/doc/can-stache-bindings.html",

@@ -732,2 +732,18 @@ var QUnit = require('steal-qunit');

QUnit.test("events should not create viewmodels (#540)", function(assert) {
var ta = this.fixture;
var template = stache("<div id='click-me' on:click='func()'></div>");
var frag = template({
func: function(){
assert.ok(true, "func ran");
}
});
ta.appendChild(frag);
var el = doc.getElementById("click-me");
domEvents.dispatch(el, "click");
assert.equal(el[canSymbol.for("can.viewModel")], undefined, "el does not have a viewmodel");
});
});

Sorry, the diff of this file is not supported yet

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