Creating a Canvas App Event
The following code example shows how to call the publish method to create a canvas app event. If you’re using a namespace, the event name must be prefaced by the namespace. For example, namespace.eventName.
Sfdc.canvas(function() {
sr = JSON.parse('<%=signedRequestJson%>');
Sfdc.canvas.client.publish(sr.client,
{name : "mynamespace.statusChanged", payload : {status : 'Completed'}});
});