Frame:RegisterAllEvents

From Warcraft Wiki
Jump to navigation Jump to search

Flags the frame to receive all events.

Frame:RegisterAllEvents()

Details

  • This internally sets a flag to receive all events, so it cannot be used in conjunction with Frame:UnregisterEvent.
  • It is not advisable to use this for anything except debugging or datamining purposes, as the incurred performance penalty may be quite large.

Example

Prints all events that fire.

local function OnEvent(self, event, ...)
	print(event, ...)
end

local f = CreateFrame("Frame")
f:RegisterAllEvents()
f:SetScript("OnEvent", OnEvent)

Patch history

Battle for Azeroth Patch 8.0.1 (2018-07-17): Calling RegisterAllEvents() and subsequently UnregisterEvent() no longer works. This was not intended to be used in conjunction with unregistering/registering-single.
WoW Icon update.png Patch 1.11.0 (2006-06-19): Added.