I want to make custom element with attached/detached methods. Is it a right way to add these methods inside custom element?