Please note: All components are children of Stacks (the item with the header and the tabs)! Even if a component is not configured as a child of a stack one will implicitly be added.

The Stack item provides access to its header and the components within it. Some examples:

myLayout.on('stackCreated',function( stack ){/*
* Accessing the DOM element that contains the popout, maximise and * close icon
*/
stack.header.controlsContainer.prepend('<div>foo</div>');/*
* Listening for activeContentItemChanged. This happens initially
* when the stack is created and everytime the user clicks a tab
*/
stack.on('activeContentItemChanged',function( contentItem ){ // interact with the contentItem
});/*
* Accessing the container and updating its state
*/
stack.getActiveContentItem().container.extendState({color:'#faa'});});