constraintjs
constraintjs copied to clipboard
Absent parameters in DOM Bindings document
trafficstars
It seems there is absent parameter in signature of bindCSS and in the corresponding example inside DOM Bindings document.
In the former case there is no reference to the processed DOM element:
.bindCSS(attr_name,value) — set a CSS attribute of the DOM obj.
In the latter case CSS style property (attr_name) is absent:
var binding = cjs.bindCSS(my_elem, bg_color); // my_elem has a red background
Also ) is absent at the end of the first sentence in Array & Map Constraints:
So far, all of the constraint variables we have discussed have been simple objects (constructed using cjs.constraint() .