Closed leifoolsen closed 7 years ago
We still use the DOMNodeRemoved
as it's difficult to observe oneself's removal with MutationObserver
(you can only specify childList
). This makes sure that if a modal dialog that's open is removed from the page, we properly unblock the page.
The alternative is to use a MutationObserver
for the whole page but there's different overhead there.
When FF and other browsers properly deprecate this event, hopefully there'll be a better solution.
@samthor: Thank you for reply. The dialog polyfill works great in browsers I have tested, and I have no problem with the warnings from FF. Regards Leif Olsen
@samthor , but the current code attaches the DOMNodeRemoved
listener to the document, MutationObserver
can be used the same way too, not?
@Yaffle you're right, thanks. I'll re-open this bug, I thought the code used it directly on the node.
@samthor thanks for reply
When I use dialog polyfill in Firefox version 45.0.1, OSX I get the following warning in console: "Use of Mutation Events is deprecated. Use MutationObserver instead.". Shouldn't the polyfill use MutationObserver if provided by the browser?