Trigger callback on animation frame change

Thanks @nickest
I tried to used that code but I’m getting this error:

TypeError: Cannot read property '_guiEditing' of undefined

The element with id=‘tester’ is a dcc.Graph created in python code.
I’m using dcc.Interval() to call the javascript code to have control of when to leave the loop.
I can make it works creating a new plot for each iteration, but if I just try to get the graph element by the id and relayout it I get the above error.