Kotlin js: strange behaviour in HTMLDivElement.onclick

thanks!
i still dont understand at all why adding null at the end of the line solves the error of the line above, but anyway it works! :slight_smile:

and i also did not understand your “proper way”, how can i trigger onclick event without using onclick? do you mean i shoudl use the addEventListener("onclick … instead?