JavaScript methods in web embed
The host page can use JavaScript (JS) to invoke methods that support querying or manipulating the web embed. This functionality provides you with the tools to meet the needs of your particular use case.
JS API methods
Web embeds support the following JS methods:
- load
- Used in conjunction with the
deferLoad=true
attribute to delay the load of the embed until this API is invoked.Arguments: None
- reload
- Used to return the web embed to its original attributes. You can use this method to get the user back to the first page that loaded.
- For example, if a page contains links to work objects, and the user
opens those objects, the embedding displays the case screen associated
with the object. The reload method provides a way to return to the
original page. This method is similar to the load method, but when the
action is
createCase
, this method remaps the embed to anopenAssignment
action. In this case, the system uses the ID from the priorcreateCase
invocation for theopenAssignment
call.Arguments: None
- getEmbedData
- Gets the value of a specified property.
Arguments: propName
- setEmbedData
- Sets the value of a specified property.
Arguments: propName, value
- getEmbedInfo
- Returns a structure with information about the loading outcome and
uncommitted properties.
Arguments: None
- logout
- Ends the active server session by revoking tokens and removing the content in the web embed. This method also releases open object locks.
Arguments: None
- updateTokens
- Passes the token object returned from a OAuth token endpoint back to the
embedding when
popupReauth
is specified as“false”
. Arguments: token
- getEmbedData
Gets the value of a specified property.
- setEmbedData
Sets the value of a specified property.
- getEmbedInfo
Returns a structure with information about the loading outcome and uncommitted properties.
- updateTokens
Passes the token object returned from a OAuth token endpoint back to the embedding when popupReauth is specified as “false”.
Previous topic Attributes in web embed Next topic getEmbedData