American sitcom That '70s Show has these lines (YouTube):
Eric: So, uh, for future reference, do I have to ask you, uh, before I go out with my friends?
Donna: No. Uh yes. Sometimes.
Eric: So, uh, how will I know which times?
Donna: Well, you'll know afterwards, when I get mad.
Is when a relative word taking afterwards as antecedent?
If you think this analysis is wrong, please provide your own analysis.
If you think this is right, please explain why it has to be.