Skip to content

Commit

Permalink
Merge pull request #111 from canjs/110-dev-only
Browse files Browse the repository at this point in the history
only assign getChagnesDepsRecord in dev
  • Loading branch information
justinbmeyer committed Jun 19, 2018
2 parents c73f103 + 0cd65f8 commit dce1d92
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/attr.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ live.attr = function(el, attributeName, compute) {
function liveUpdateAttr(newVal) {
queues.domUIQueue.enqueue(attr.set, attr, [el, attributeName, newVal]);
}
//!steal-remove-start
// register that the handler changes the parent element
canReflect.assignSymbols(liveUpdateAttr, {
"can.getChangesDependencyRecord": function() {
Expand All @@ -40,7 +41,6 @@ live.attr = function(el, attributeName, compute) {
};
}
});
//!steal-remove-start
Object.defineProperty(liveUpdateAttr, "name", {
value: "live.attr update::"+canReflect.getName(compute),
});
Expand Down
5 changes: 3 additions & 2 deletions lib/attrs.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ live.attrs = function(el, compute, scope, options) {
}
oldAttrs = newAttrs;
}

//!steal-remove-start
// register that the handler changes the parent element
canReflect.assignSymbols(liveAttrsUpdate, {
"can.getChangesDependencyRecord": function() {
Expand All @@ -66,8 +68,7 @@ live.attrs = function(el, compute, scope, options) {
};
}
});

//!steal-remove-start

Object.defineProperty(liveAttrsUpdate, "name", {
value: "live.attrs update::"+canReflect.getName(compute),
});
Expand Down
6 changes: 4 additions & 2 deletions lib/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ live.html = function(el, compute, parentNode, nodeList) {
var pn = nodeLists.first(nodes).parentNode;
data.teardownCheck(pn);
}


//!steal-remove-start
// register that the handler changes the parent element
canReflect.assignSymbols(liveHTMLUpdateHTML, {
"can.getChangesDependencyRecord": function() {
Expand All @@ -74,8 +77,7 @@ live.html = function(el, compute, parentNode, nodeList) {
};
}
});

//!steal-remove-start

Object.defineProperty(liveHTMLUpdateHTML, "name", {
value: "live.html update::"+canReflect.getName(compute),
});
Expand Down
2 changes: 1 addition & 1 deletion lib/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ live.text = function(el, compute, parentNode, nodeList) {
el.nodeValue = live.makeString(newVal);
}

//!steal-remove-start
// register that the handler changes the parent element
canReflect.assignSymbols(liveTextUpdateTextNode, {
"can.getChangesDependencyRecord": function() {
Expand All @@ -46,7 +47,6 @@ live.text = function(el, compute, parentNode, nodeList) {
}
});

//!steal-remove-start
Object.defineProperty(liveTextUpdateTextNode, "name", {
value: "live.text update::"+canReflect.getName(compute),
});
Expand Down

0 comments on commit dce1d92

Please sign in to comment.