Re: [whatwg/dom] MutationObserver needs an equivalent of disconnected & connected callbacks (#533)

Here's a concrete use case. A editor library wants to know when the editor lost the focus. Because `blur` event does not fire on an element that got disconnected from a document before losing the focus, we'd need to monitor when the element is disconnected. To do this, we currently need to monitor all child node changes of the parent node, and then detect when the editor node is removed. With the proposed observation type, we can observe the disconnection of the editor element instead.


-- 
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/533#issuecomment-366479191

Received on Saturday, 17 February 2018 23:27:28 UTC