Posted by & filed under Uncategorized.

javascript-callback-functions

Social Stream 2.0 comes with a complete Javascript refactorization in the spirit of client MVC frameworks. The key component is SocialStream.Callback, a constructor that enables Social Stream’s element callbacks.

Lets take the example of Social Stream’s timelines. When a timeline is showed, the following callback is fired:

SocialStream.Timeline.show();

You can subscribe your own methods to the timeline in order to inialiaze an HTML5 player, for example:

SocialStream.Timeline.callbackRegister('show', function() {
/* your callback here */
});

It makes the framework even more flexible!

Tags:

/// Leave a Reply

  • (will not be published)