W3C-compliant implementation of the EventTarget interface