Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
javascript
javascript
gadgets.ee.registerRootContextListener(function(rootContext) {
  var eeDataModel;
  if(rootContext.type === opensocial.type.Activity) {
    eeDataModel = rootContext.root.openSocial.embed;
  } else if(rootContext.type === opensocial.type.Message) {  
    //At the time this proposal was written EE was not integrated into the OpenSocial Message object
    eeDataModel = rootContext.root.embed;
  } else if(rootContext.type === opensocial.type.SearchResult) {  
    //At the time this proposal was written there is no SearchResult object in the OpenSocial spec
    eeDataModel = rootContext.root.embed;
  } else {
    gadgets.error('Unknown type');
  }
});

...

Description: A constant for the OpenSocial Message type.

Note: Proposal to introduce embedded experiences in the OpenSocial Message object is here.

<static> opensocial.type.SearchResult

Description: A constant for a search result.

Note:  We need to define Search and Search results in the OpenSocial spec.