- From: Anne van Kesteren <notifications@github.com>
- Date: Mon, 20 Sep 2021 02:47:12 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 20 September 2021 09:47:25 UTC
#863 considered `isTrusted` a legacy feature, but yeah, I think there is some value in it for cases like this. I think the correct approach here would be to add a feature that event listeners can filter for this, not to forbid `dispatchEvent()`. The latter seems too drastic and quite a departure from the existing model, whereas the former fits in quite naturally. As for `new EventTarget()`, perhaps https://blog.domenic.me/the-revealing-constructor-pattern/ would be a way to expose a `dispatchEvent()` that can dispatch trusted `Event` instances. Although really you want the `Event` instance itself to be created or blessed in such a way (so `ev.isTrusted` is correct at all times), so this might need some more thought. -- 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/1016#issuecomment-922775714
Received on Monday, 20 September 2021 09:47:25 UTC