Re: [whatwg/dom] [Proposal] Add EventTarget.getEventListeners() (#412)

@LeaVerou I agree. But @domenic and @annevk's point about encapsulation is a concern I share as well, and I don't think it's a good idea to expose other people's event handlers, they are not meant to be exposed and messed with, that would be a breach of the contract you sign up when you listen to an event. You want the object you observe to call you, but you don't want that object to allow any object with read access to it to be able to call you with untrusted arguments and when no event was fired. If you can get access to the function that listens to an event, you can do just that.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/412#issuecomment-486424022

Received on Wednesday, 24 April 2019 21:00:47 UTC