This is because IE generates a new, separate “element” (made of proprietary and deprecated
VML) and places it behind the content to make it look like a styled box. Modifying the actual content element with JS doesn’t modify the additional VML. I’m not sure if it’s possible to modify the VML element with JS, too, but after all, it’s easier to not change elements that have the HTC behavior but rather a wrapper without such.