The former. onEvent can't be the abstraction. The litmus test is: is it a named function that the student wrote. What the reader is looking for is - did the student have an insight to develop an abstraction (i.e. function) because it was something that could be reused, or because it helped manage the complexity of the task.
If you look to the exemplars of the color sleuth project in Unit 5 Lesson 10 you'll see some examples and commentary about this.
Also, if you haven't, you should really check out the Create PT survival guide. In the Create PT prep mini-unit which has a lot of student-facing guidance and activities around this very subject.