Small optimization, mainly for IOS.

Optimization mainly for IOS, where hasEventListener check works much slower then on desktop.