Set active state of a tab

tab.shown and tab.hidden have been killed. Although tab.shown is still working in some code bases and tab.hidden works one time only in some code bases.