Use addEventListener instead.