This could be merged with LinkUpdater module as both those modules deal with the DOM for AB/testing purposes and have the same dependencies.