Yes, declarative with an event handler is better.