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

can-stache-bindings

Package Overview
Dependencies
Maintainers
4
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 3.0.0-pre.28 to 3.0.0-pre.29

2

package.json
{
"name": "can-stache-bindings",
"version": "3.0.0-pre.28",
"version": "3.0.0-pre.29",
"description": "Default binding syntaxes for can-stache",

@@ -5,0 +5,0 @@ "homepage": "http://canjs.com",

@@ -360,41 +360,2 @@ require("./bindings-define-test");

if (window.jQuery) {
test("can-event passes extra args to handler", function () {
expect(3);
var template = stache("<p can-myevent='handleMyEvent'>{{content}}</p>");
var frag = template({
handleMyEvent: function(context, el, event, arg1, arg2) {
ok(true, "handleMyEvent called");
equal(arg1, "myarg1", "3rd argument is the extra event args");
equal(arg2, "myarg2", "4rd argument is the extra event args");
}
});
var ta = this.fixture;
ta.appendChild(frag);
var p0 = ta.getElementsByTagName("p")[0];
canEvent.trigger.call(p0, "myevent", ["myarg1", "myarg2"]);
});
test("extra args to handler can be read using `%arguments`", function () {
expect(4);
var template = stache("<p can-myevent='handleMyEvent(%arguments)'>{{content}}</p>");
var frag = template({
handleMyEvent: function(args) {
ok(true, "handleMyEvent called");
ok(args[0] instanceof window.jQuery.Event, "args[0] is a jquery event");
equal(args[1], "myarg1", "args[1] is the extra event args");
equal(args[2], "myarg2", "args[2] is the extra event args");
}
});
var ta = this.fixture;
ta.appendChild(frag);
var p0 = ta.getElementsByTagName("p")[0];
canEvent.trigger.call(p0, "myevent", ["myarg1", "myarg2"]);
});
}
test("can-value input text", function () {

@@ -401,0 +362,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