Re: [whatwg/dom] `mutationObserver.disconnect({ flush: true })` (Issue #1283)

@LeaVerou what do you envision this addition looking like? Is it better to have redundant options (like giving developers the choice between passing in a dictionary to `takeRecords()` to automate this process when `disconnect()` gets called or calling `flush()` manually)? Or is this something should we only implement in one way?

@smaug---- Do you know why `disconnect()` was designed this way? I'm curious if there's any case where a developer might want to use `takeRecords()` with `disconnect()`, then later in the codebase call `observe()` and `disconnect()` without `takeRecords()` using the same `MutationObserver` object. Seems like an unlikely scenario but if there's a use case for doing this I think the redundancy described above might be the best way to go about this feature addition.

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

Message ID: <whatwg/dom/issues/1283/2395231509@github.com>

Received on Sunday, 6 October 2024 00:03:53 UTC