Wowpedia
Advertisement
This function is implemented by FrameXML in FrameXML/SecureHandlers.lua.

Stores a frame handle for access from inside the RestrictedEnvironment

SecureHandlerSetFrameRef(frame, label, refFrame)
SecureHandlerBaseTemplate:SetFrameRef(label, refFrame)

Arguments

frame 
Frame - A protected frame that will execute code snippets.
label 
string - Label to refer to the frame handle during the restricted environment.
refFrame 
Frame - Frame for which a handle should be created.

Details

  • Handles may be retrieved using self:GetFrameRef(label).
  • Once retreived, there are several frame handle methods for secure interaction.

Example

The following snippet demonstrates how to transfer a frame handle to the restricted environment:

local secureHandlerFrame = CreateFrame("FRAME", nil, nil, "SecureHandlerBaseTemplate")
secureHandlerFrame:SetFrameRef("UIParent", UIParent)
secureHandlerFrame:Execute([[
	UIParent = self:GetFrameRef("UIParent")
]])


Advertisement