The recommended way to listen to selected tab change is
myTabContainer.watch("selectedChildWidget", function(name, oval, nval){
console.log("selected child changed from ", oval, " to ", nval);
});
see https://dojotoolkit.org/reference-guide/1.10/dijit/layout/TabContainer.html#tabcontainer-events
It works for TabContainer.addChild and TabContainer.removeChild, too. However, then TabContainer.removeChild removes the last selected tab, then the watch event is not fired, but the selectedChildWidget is set to undefined, see https://github.com/dojo/dijit/blob/master/layout/StackContainer.js#L204 I would like selectedChildWidget to set properly even when the last tab is removed.