Use TimerPanel.prototype.onvisibilitychange