It also seems like it might be a little cleaner to explicitly only do either the href change or the node add/remove depending on which browser you're in. (I don't think it actually matters functionally since the browser probably will only do one update even if you do both changes anyway, but it's easier to understand if you guard it per browser.)