react does not support ie7 with hasAttribute