Apply layers of functionality to a given element.