Run each time the screen is drawn by the game engine. This handler runs for each frame (not Frame) drawn -- if WoW is currently running at 27.5 frames per second, the OnUpdate handlers for every visible Frame, Animation, and AnimationGroup (or descendant thereof) are run approximately every 2/55ths of a second. Therefore, OnUpdate handler can be useful for processes which need to be run very frequently or with accurate timing, but extensive processing in an OnUpdate handler can slow down the game's framerate.

See the chapter "Responding to Graphic Updates with OnUpdate" for more information.


OnUpdate(self, elapsed)


  • self - Reference to the widget for which the script was run (frame)
  • elapsed - Number of seconds since the OnUpdate handlers were last run (likely a fraction of a second) (number)