Bind functions to DOM attributes.