Updated to not use a time but a DOM observer