Class: GadgetContext

documents.sdk GadgetContext

Constructors

The GadgetContext provides gadget related functions for the client side scripting

  • Since:
    • 5.0c

Methods

getClientObject(){Object}

Returns the gadget client object if available.
Currently the following Gadgets have a client object:

  • FullCalendar: FullCalendar-Object (jQuery element) is returned
  • Chart: The Chart.js-Object is returned,
  • Form: GadgetForm is returned,
Returns:
Type Description
Object The client object
Example
// Get the GadgetContext 
var gadgetContext = documentsContext.getGadgetContext();
// Get the FullCalendar client object   
var $fullCalendar = gadgetContext.getGadgetClientObject();  

getContextData(){Any}

Get the contextData added in the gadget portal script with the function setContextData

Returns:
Type Description
Any contextData - The context data