{ Elements: { Events: { _: TK.Event, Subscribe: ["Test"], // Subscribe for event type Test Receive: function(eventType, eventData) { this.Parent.Elements.ReceivedEvents.Add({ _: "p", innerHTML: eventData }); } }, ReceivedEvents: { innerHTML: "Events received will be displayed here" } } }
{ _: "button", innerHTML: "Press me and look at the example output above", onclick: function() { TK.Event.Send("Test", "This is the data") } }