SecureHandlerSetFrameRef()
Jump to navigation
Jump to search
- This function is implemented in
FrameXML/SecureHandlers.lua
.
- This function is implemented in
This function is protected, and cannot be called from insecure code while in in combat.
|
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")
]])
|