- From: Kevin Gibbons <notifications@github.com>
- Date: Thu, 04 Dec 2025 16:07:28 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 5 December 2025 00:07:32 UTC
bakkot left a comment (whatwg/dom#1425) Calling `.addAbortCallback(yourCleanupFunction)` works just as well as using a symbol; arbitrary objects can have a method named `"addAbortCallback"`. There's no need to introduce a new symbol here. The main reasons to use a symbol-based rather than string-based protocol are when this is a protocol that arbitrary objects might implement (like Iterator), or when you want to switch on the presence of the protocol (like Promise). Neither holds here. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/pull/1425#issuecomment-3614796715 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/pull/1425/c3614796715@github.com>
Received on Friday, 5 December 2025 00:07:32 UTC