git ssb

1+

Matt McKegg / mutant



Commit 47e9da79b4756a70bb65f6ba7223c366dced141a

apply-properties: name binding functions for debug assistance

Matt McKegg committed on 9/27/2016, 8:20:26 PM
Parent: ae89aab540caa1cee5f40dcc78fc2210e40b024e

Files changed

lib/apply-properties.jschanged
lib/apply-properties.jsView
@@ -80,24 +80,24 @@
8080 }
8181 }
8282
8383 function bindClassList (target, obs, key) {
84- return watch(obs, function (value) {
84+ return watch(obs, function boundClassList (value) {
8585 value = [].concat.apply([], value).filter(present).join(' ')
8686 if (value || target[key]) {
8787 target[key] = value
8888 }
8989 })
9090 }
9191
9292 function bindStyle (target, styleObs, key) {
93- return watch(styleObs, function (value) {
93+ return watch(styleObs, function boundStyle (value) {
9494 target.style.setProperty(key, value)
9595 })
9696 }
9797
9898 function bindAttr (target, attrObs, key) {
99- return watch(attrObs, function (value) {
99+ return watch(attrObs, function boundAttr (value) {
100100 if (value == null) {
101101 target.removeAttribute(key)
102102 } else {
103103 target.setAttribute(key, value)
@@ -105,9 +105,9 @@
105105 })
106106 }
107107
108108 function bind (target, obs, key) {
109- return watch(obs, function (toValue) {
109+ return watch(obs, function bound (toValue) {
110110 var fromValue = target.getAttribute(key)
111111 if (fromValue !== toValue) {
112112 target.setAttribute(key, toValue)
113113 }

Built with git-ssb-web