I also think `setElement` is a perfectly fine place to set attributes as well. It fits the contract.