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 
3min

HypeXAPI.setDefault

The setDefault function allows you to override a global default by key or to override all defaults at once by passing in an object. To override a specific default, pass in the key as the first argument and the value you want to set as the second argument. For example, to override the default for the key "name", you would do the following:

JS
|


In the following example, the setDefault function is being used to override the defaults for the key "verbs". The new default values that are being set are an object with the keys "started" and "finished". Each of these keys has an id and display value.

This function can be useful if you want to change the default values for a specific key or for all keys at once.

JS
|


Verbs constitute a special case over defaults like (object, context etc.). If a verb statement is referenced later in the GUI, it is also looked up in ADL.verbs as a fallback. This allows for the use of common verbs in the GUI without having to duplicate them in your default verbs, as they will be fetched from the fallback.

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