can-queues
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -51,1 +51,17 @@ var QUnit = require('steal-qunit'); | ||
}); | ||
QUnit.test("Functions call multiple times retain their element", function(assert) { | ||
var queue = new DomOrderQueue("dom"); | ||
var element = createElement("span"); | ||
var fn = function(){ | ||
assert.ok(true, "called this function"); | ||
}; | ||
fn[canSymbol.for("can.element")] = element; | ||
queue.enqueue(fn, null, {}); | ||
queue.enqueue(fn, null, {}); | ||
var otherFn = function(){}; | ||
otherFn[canSymbol.for("can.element")] = createElement("li"); | ||
queue.enqueue(otherFn, null, {}); | ||
queue.flush(); | ||
}); |
@@ -79,2 +79,11 @@ "use strict"; | ||
task.args = args; | ||
if(!meta) { | ||
meta = {}; | ||
} | ||
if(!meta.element) { | ||
meta.element = fn[canElementSymbol]; | ||
} | ||
task.meta = meta; | ||
@@ -81,0 +90,0 @@ } |
{ | ||
"name": "can-queues", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "A light weight JavaScript task queue", | ||
@@ -5,0 +5,0 @@ "homepage": "", |
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
241560
1177