- From: Benjamin Gruenbaum <notifications@github.com>
- Date: Wed, 03 May 2023 08:16:08 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 3 May 2023 15:16:13 UTC
> I think I see now. That seems hard to reconcile with the GC goals. Do you have an idea for that? Sure - instead of signals following other signals internally we use the same machinery of `addEventListener` which would make the spec much simpler - we instead absorb the complexity in EventTarget that accepts an (internal only) "weak" flag to tell the implementation not to hold the listener strongly (in spec speak this wouldn't go through the public addEventListener but through "add an event listener" directly). That would unify the underlying mechanism and this would remain "just another EventTarget" instead of having a separate subscription mechanism and instead we gain the ability to have weak event listeners (only internally for now). The cool bit is that this would also enable weak event listeners in the future more generally if we want to expose those to user-land. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/pull/1152#issuecomment-1533227103 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/pull/1152/c1533227103@github.com>
Received on Wednesday, 3 May 2023 15:16:13 UTC