Skip to content

Commit

Permalink
Merge pull request #102 from canjs/use-attr-set
Browse files Browse the repository at this point in the history
using can-attribute-observable.set instead of setAttrOrProp
  • Loading branch information
phillipskevin authored Apr 4, 2018
2 parents 5cac7f8 + 599857d commit d6ff07c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/attr.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var attr = require("can-attribute-observable/behaviors");
*/
live.attr = function(el, attributeName, compute) {
function liveUpdateAttr(newVal) {
queues.domUIQueue.enqueue(attr.setAttrOrProp, attr, [el, attributeName, newVal]);
queues.domUIQueue.enqueue(attr.set, attr, [el, attributeName, newVal]);
}
// register that the handler changes the parent element
canReflect.assignSymbols(liveUpdateAttr, {
Expand All @@ -50,5 +50,5 @@ live.attr = function(el, attributeName, compute) {
live.listen(el, compute, liveUpdateAttr);

// do initial set of attribute as well
attr.setAttrOrProp(el, attributeName, canReflect.getValue(compute));
attr.set(el, attributeName, canReflect.getValue(compute));
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
]
},
"dependencies": {
"can-attribute-observable": "^0.2.0",
"can-attribute-observable": "^0.2.1",
"can-dom-mutate": "^1.0.0",
"can-observation": "^4.0.0",
"can-queues": "^1.0.0",
Expand Down

0 comments on commit d6ff07c

Please sign in to comment.