wrap
'wraps' a function around the original function
function wrap(function target,function source);
| target | function | the function to wrap. It receives the new logic |
| source | function | a function that contains the logic to wrap |
| function | the target object 'wrapped' around by the new logic |
Example
list.add = webix.wrap(list.add, function(obj, index){
//log all data adding operations
console.log("add "+obj.id);
});
Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support,
connect with other developers, and share your feedback there.