Using an event listener as opposed to an inline function.