--- 'rrweb': patch --- Refactor to preclude the need for a continuous raf loop running in the background which is related to shadowDom