attrs
Add a Map of attr callbacks
callbacks.attrs(map)
Register a set of attribute callbacks.
import callbacks from 'can-view-callbacks';
const attrs = new Map();
attrs.add(/foo/, function(el, attrData) {
...
});
callbacks.attrs(attrs);
This will loop over the set of bindings and register them all with attr.
Parameters
- map
{Map|Object}
:A key/value pair where the keys are strings or regular expressions and the values are callback functions.