can-stache-bindings
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -431,3 +431,3 @@ // # can-stache-bindings.js | ||
queues.batch.start(); | ||
queues.notifyQueue.enqueue(updateFn, null, null, { | ||
queues.mutateQueue.enqueue(updateFn, null, null, { | ||
//!steal-remove-start | ||
@@ -434,0 +434,0 @@ reasonLog: [el, ev, attributeName+"="+attrVal] |
@function can-stache-bindings.event on:event | ||
@parent can-stache-bindings.syntaxes 0 | ||
@parent can-stache-bindings.syntaxes | ||
@@ -4,0 +4,0 @@ @description Respond to events on elements or component ViewModels. |
@function can-stache-bindings.raw toChild:raw | ||
@parent can-stache-bindings.syntaxes 4 | ||
@parent can-stache-bindings.syntaxes | ||
@@ -4,0 +4,0 @@ @description One-way bind a string value to the [can-component.prototype.ViewModel ViewModel] or element. |
@function can-stache-bindings.toChild toChild:from | ||
@parent can-stache-bindings.syntaxes 1 | ||
@parent can-stache-bindings.syntaxes | ||
@@ -4,0 +4,0 @@ @description One-way bind a value in the parent scope to the [can-component.prototype.ViewModel ViewModel] or element. |
@function can-stache-bindings.toParent toParent:to | ||
@parent can-stache-bindings.syntaxes 2 | ||
@parent can-stache-bindings.syntaxes | ||
@@ -4,0 +4,0 @@ @description One-way bind a value from the [can-component.prototype.view-model viewModel] or element to the parent scope. |
@function can-stache-bindings.twoWay twoWay:bind | ||
@parent can-stache-bindings.syntaxes 3 | ||
@parent can-stache-bindings.syntaxes | ||
@@ -4,0 +4,0 @@ @description Two-way bind a value in the [can-component.prototype.view-model viewModel] or the element to the parent scope. |
{ | ||
"name": "can-stache-bindings", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Default binding syntaxes for can-stache", | ||
@@ -5,0 +5,0 @@ "homepage": "https://canjs.com/doc/can-stache-bindings.html", |
@@ -11,2 +11,4 @@ var QUnit = require('steal-qunit'); | ||
var DefineList = require("can-define/list/list"); | ||
var SimpleObservable = require("can-simple-observable"); | ||
@@ -455,2 +457,35 @@ var canViewModel = require('can-view-model'); | ||
}); | ||
QUnit.test("event handlers should run in mutateQueue (#444)", function(){ | ||
var list = new DefineList([ | ||
{name: 'A'}, | ||
{name: 'B'}, | ||
{name: 'C'} | ||
]); | ||
var data = new SimpleMap({ | ||
list: list, | ||
item : list[1], | ||
clearStuff: function(){ | ||
this.set("item", null); | ||
this.get("list").splice(1, 1); | ||
} | ||
}); | ||
var template = stache( | ||
"<div on:click='clearStuff()'>"+ | ||
// The space after }} is important here | ||
"{{#each list}} "+ | ||
"{{^is(., ../item)}}"+ | ||
"<div>{{name}}</div>"+ | ||
"{{/is}}"+ | ||
"{{/each}}"+ | ||
"</div>"); | ||
var frag = template(data); | ||
domEvents.dispatch(frag.firstChild, "click"); | ||
QUnit.ok(true, "no errors"); | ||
}); | ||
}); |
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
168749
3664