OK, i found the answer, it's some Prototype Extensions to the native JS: "Function.subscribeTo".
Located in the KONtx API Reference
http://developer.yahoo.com/connectedtv/kon...idget_KONtx.pdfFunction.subscribeTo()
subscribes a method to a list of events
Synopsis
Function subscribeTo(Object publishingObject, MixedType eventTypes, Object bindingScope)
Parameters
The parameter publishingObject is the object on which you listen to events. The parameter
eventTypes is a single String event type or an Array of event types to which to subcribe this
Function. The optional parameter bindingScope is the Object to which this Function will be rebound
before subscribing.
Returns a Function which is the final method as subscribed.
Description
Subscribes the given events to the publishing object.
Example
CODE
var ToolboxSnippetView = new KONtx.Class({
ClassName: 'ToolboxSnippetView',
Extends: KONtx.system.SnippetView,
initialize: function() {
this.parent();
this._handleActivateSnippet.subscribeTo(this, ['onActivateSnippet'], this);
},
_handleActivateSnippet: function(event) {
if(this.config.data && this.config.data.destinationId) {
event.preventDefault();
event.stopPropagation();
KONtx.application.setHostResultToViewId(event, this.config.data.destinationId);
}
},
createView: function() {
}
});