Developer Docs - Apple TV Docs - Utility Commands
Set Context
Sets the application context using the give key/value.
Glendale Campus
Parameters for this command include:
Clear Context
Clears the context value for the given key.
Clear Campus
Parameters for this command include:
Toggle Attribute
TV v2.0
This is a command used to change the style of objects on the DOM. Loops through the applied styles in the rockToggleAttributeSelector.
For these examples, imagine we have the following styles:
A title that changes colors when the button is selected:
Look, I change colors!
Changing all red to green:
To green I go.
Parameters for this command include:
Follow
TV v2.0
This is a command used to follow/unfollow entities within your application. This command specifically applies related styling and source changes of an object on the DOM, if you do not provide the rockFollowIconSelector, it will inherit from the element the command is attributed to.
For example, the following code:
Produces an output of a heart icon that toggles between hollow and filled in red when selected.
You can also update the source of a resource dependent on the following state. For example, the following code:
Produces an output of an add icon when the button is not followed and remove icon when the button is.
Parameters for this command include:
Remove Item
TV v2.0
This command removes an object from the DOM when executed.
See ya!
To target another object, use the rockRemoveSelector property.
Nooooo! Don't do it!
Remove the text
Parameters for this command include:
Pray For Request
TV v2.0
Use this command to create a unique prayer experience in your TV application. This command increments a PrayerRequest. Simply pass in a rockPrayerRequestGuid.
I prayed