...
| Code Block | ||||
|---|---|---|---|---|
| ||||
gadgets.util.registerOnLoadHandler(function() {
opensocial.data.getDataContext().registerListener('org.opensocial.ee.context', function(key) {
var context = opensocial.data.getDataContext().gerDataSetgetDataSet(key);
//finally do something with the context
});
});
|
...
Name | Type | Description |
|---|---|---|
listener | Function | A function that will be called whenever the embedded experience context is set for this gadget. The function should take one parameter which is a JSON object representing the embedded experience context from the gadget. See the embedded experiences data model description for more information on the context object. |
Example:
| Code Block | ||||
|---|---|---|---|---|
| ||||
gadgets.ee.registerContextListener(function(context) {
//Do something with the context
});
|
Additional Considerations:
...