At the moment I’m trying option 3. My reasoning is that it is the most simple to implement and maintain. The concern that it could cause a re-rendering seems minimal to me. Presumably since the parser proceeds linearly through the html than this change should occur before much else and thus not lead to any visible flicker. However, real world testing may be the only way to discern if any of these methods are superior to the others.