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.ActivityActivityEntry) {
    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');
  }
});

...