Which is why it can easily understand how innerHTML is being used so that it can replace it with the right thing.