Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Register
Advertisement
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
👉See also: Object security

Addons and macro scripts are insecure code and are bound by different measures of restrictions when calling API functions. If taint spreads to the rest of the UI this will render Blizzard code insecure too.

protected

APIs which cannot be called by insecure code. Fires ADDON_ACTION_FORBIDDEN.

/run JumpOrAscendStart()

API restricted 01

*** ForceTaint_Strong *** means it was called from a /run script, otherwise this would normally be the addon name.

hwevent

APIs which require a hardware event (like the user clicking a button). Fires ADDON_ACTION_BLOCKED.

/run C_Timer.After(0, function() SetCurrentTitle(47) end) -- does not work

nocombat

APIs which cannot be called in combat. Fires ADDON_ACTION_BLOCKED.

/run CreateMacro("test", 136243) -- does not work in combat

secureframe

Widget APIs which cannot be called on secure frames in combat. Fires ADDON_ACTION_BLOCKED.

/run ActionButton1:Hide() -- does not work in combat

API restricted 02

restrictedframe

Widget APIs which cannot be called on restricted frames such as nameplates. Throws a Lua error.

/dump NamePlate1:GetBottom() -- Error: [string "return NamePlate1:GetBottom()"]:1: Action[FrameMeasurement] failed because[Can't measure restricted regions]: attempted from: NamePlate1:GetBottom().

noscript

APIs which cannot be called directly from a /run script or WeakAura. Fires ADDON_ACTION_BLOCKED or silently fails, depending on the API.

/run C_AuctionHouse.SearchForFavorites({}) -- does not work and also bricks the AH in the process

Putting it inside a function in an addon and then calling it manually works.

function Example() -- /run Example()
	C_AuctionHouse.SearchForFavorites({})
end
-- or as a button
local btn = CreateFrame("Button", nil, UIParent, "UIPanelButtonTemplate")
btn:SetPoint("CENTER")
btn:SetSize(120, 40)
btn:SetText("Example")
btn:SetScript("OnClick", function(self, button)
	C_AuctionHouse.SearchForFavorites({})
end)

Pages in category "API functions/restricted"

The following 189 pages are in this category, out of 189 total.

A

Advertisement