The initEvent method is deprecated.

The initEvent method is deprecated. Use event constructors.