- From: Victor Csiky <notifications@github.com>
- Date: Wed, 24 Apr 2019 10:54:46 +0000 (UTC)
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/issues/412/486174161@github.com>
> For example, given [the code for TacoButton here](https://html.spec.whatwg.org/multipage/scripting.html#custom-elements-autonomous-drawbacks), you'd no longer be able to guarantee that all taco-buttons on the page properly forward enter/space keydowns to click events, or that they stop firing click events when disabled. One should absolutely not do that at all, for that is bad practice. "Triggering" click/whatever handlers programmatically is an abysmal idea that should only be practiced when one has absolutely no other possibility (as in "overriding something in a wordpress theme without rewriting/changing it" - and on this level). _Of course, assistive technologies and a few other such cases may be valid, but nevertheless, the argument stands._ Moreover, one should absolutely not do things like sending some tracking nonsense from <a> click events BEFORE letting the link fire (this alone is the greatest web annoyance ever - what if the library that you are calling did not load? It is absolutely unreasonable from privacy viewpoint to EXPECT it to be there) - this is also an abysmal practice. This, as I see it, boils down to * a library developer (or, in reality, anybody) should **not at all** bind event handlers automatically to **any** elements not created/inserted/mounted/whatever by themselves; and * a library developer (or, in reality, anybody) should **not at all** be expected to have any responsibility for issues arising out of other "developers" unbinding their event handlers from the elements _they_ created. As far as I am concerned, that be it. -- 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-486174161
Received on Wednesday, 24 April 2019 10:55:11 UTC