almost copy-pasted DOM events contribution