Register callback when Widget::register() detects the environment wasn't yet set up.