Hype xAPI Documentation

⌘K
👋 WELCOME to HypeXAPI
Introduction
What is Hype?
What is xAPI?
Why are we doing it?
How are we doing it?
Functions in Hype xAPI
hypeDocument
HypeXAPI
Docs powered by archbee 
2min

hypeDocument.runExpression

The hypeDocument.runExpression function allows you to run a JavaScript expression in the context of an object. The expression is evaluated in the context of the object, and the result is returned. The most common use for this function is to run a JavaScript expression in the context of a hypeDocument. This allows you to access and modify the document's data, including its timeline and scene data. For example, you could use hypeDocument.runExpression to do a calculation:

JS
|


The variable c would be looked up in the hypeDocument's context and would be set to the result of the calculation. Make sure to predeclare any variables you plan to use in your expression, otherwise they will not be accessible.

Hence, that this function mainly exists to provide the GUI version and mirror the functionality in code.



Updated 03 Mar 2023
Did this page help you?
Yes
No
UP NEXT
hypeDocument.sendStatementByDataset
Docs powered by archbee