# SimpleFrameScriptObjectAPI (widget methods): World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/SimpleFrameScriptObjectAPI

## Functions

### AddAccessRestrictions

```lua
self:AddAccessRestrictions(restrictions)
```

Adds access restrictions to a script object, preventing it from being used in API calls when enforced.

Arguments:
- `restrictions`: ScriptObjectAccessRestriction

### AddForbiddenAspects

```lua
self:AddForbiddenAspects(aspects)
```

Adds forbidden aspects to a script object, restricting access to various functionalities such as script bindings.

Arguments:
- `aspects`: ForbiddenAspect

### AddSecretAspect

```lua
self:AddSecretAspect(aspect)
```

Arguments:
- `aspect`: SecretAspect

### CanBeAccessedInContext

```lua
canAccess = self:CanBeAccessedInContext()
```

Returns whether the current Lua execution context has permission to access this object.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `canAccess`: bool. False if access is denied, such as when execution is tainted and the object is forbidden or enforcing access restrictions.

### GetAccessRestrictions

```lua
restrictions = self:GetAccessRestrictions()
```

Returns the mask of all access restrictions applied to this object.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `restrictions`: ScriptObjectAccessRestriction

### GetForbiddenAspects

```lua
aspects = self:GetForbiddenAspects()
```

Returns the mask of all forbidden aspects applied to this object.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `aspects`: ForbiddenAspect

### GetInheritableForbiddenAspects

```lua
aspects = self:GetInheritableForbiddenAspects(path)
```

Returns the mask of all forbidden aspects applied to this object that can propagate to others.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `path`: ScriptObjectPropagationPath

Returns:
- `aspects`: ForbiddenAspect

### GetName

```lua
name = self:GetName()
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `name`: cstring

### GetObjectTable

```lua
objectTable = self:GetObjectTable()
```

Returns:
- `objectTable`: FrameScriptObject

### GetObjectType

```lua
objectType = self:GetObjectType()
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `objectType`: cstring

### HasAccessConstraints

```lua
hasAccessConstraints = self:HasAccessConstraints()
```

Returns whether this object has any access constraints that may limit access from some Lua execution contexts.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `hasAccessConstraints`: bool. True if this object is forbidden or subject to conditional access restrictions.

### HasAnyAccessRestrictions

```lua
hasAnyAccessRestriction = self:HasAnyAccessRestrictions([restrictions])
```

Returns true if this object has any of the supplied access restrictions applied.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `restrictions`: ScriptObjectAccessRestriction, may be nil

Returns:
- `hasAnyAccessRestriction`: bool

### HasAnyForbiddenAspects

```lua
hasAnyForbiddenAspect = self:HasAnyForbiddenAspects([aspects])
```

Returns true if this object has any of the supplied forbidden aspects added.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `aspects`: ForbiddenAspect, may be nil

Returns:
- `hasAnyForbiddenAspect`: bool

### HasAnySecretAspect

```lua
hasSecretAspect = self:HasAnySecretAspect()
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `hasSecretAspect`: bool

### HasSecretAspect

```lua
hasSecretAspect = self:HasSecretAspect(aspect)
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `aspect`: SecretAspect

Returns:
- `hasSecretAspect`: bool

### HasSecretValues

```lua
hasSecretValues = self:HasSecretValues()
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `hasSecretValues`: bool

### IsForbidden

```lua
isForbidden = self:IsForbidden()
```

Returns whether this object has been explicitly marked as forbidden.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `isForbidden`: bool. True if this object has been explicitly marked as forbidden, regardless of the current Lua execution context.

### IsObjectType

```lua
isType = self:IsObjectType(objectType)
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `objectType`: cstring

Returns:
- `isType`: bool

### IsPreventingSecretValues

```lua
isPreventingSecretValues = self:IsPreventingSecretValues()
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `isPreventingSecretValues`: bool

### SetForbidden

```lua
self:SetForbidden()
```

### SetToDefaults

```lua
self:SetToDefaults()
```

Reset all script accessible values to their default values. If possible, clears secret states.

Protected: only Blizzard's own code may call it.

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
