s/hasAttribute/contains/g to be more consistent with other method names.