Implemented a class to allow tabs to know when they have gained focus