The DevTools protocol allows one to add a script to evaluate on page load (Page.addScriptToEvaluateOnLoad). We could inject a mutation observer that triggers upon DOM changes. We could listen for these instead of using a 500ms interval for evaluation. I will experiment this weekend.
The DevTools protocol allows one to add a script to evaluate on page load (
Page.addScriptToEvaluateOnLoad
). We could inject a mutation observer that triggers upon DOM changes. We could listen for these instead of using a 500ms interval for evaluation. I will experiment this weekend.