I remember replacing some functions like this in a codebase I used to work on about twenty years ago. The senior dev at the time had to add them back a day or two later whe the site totally broke for IE users after a couple of minutes.
Fun times.
Fun times.
Think the worst one was we had some code that would add a pad in somewhere after the page was rendered that would cause IE6 to redraw the page correctly.