-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Listener added for a synchronous 'DOMNodeInserted' DOM Mutation Event deprecated #116
Comments
Possibly related to this: In Firefox found warning "Use of Mutation Events is deprecated. Use MutationObserver instead". It points to datepicker-widget.js:46 document.addEventListener('DOMNodeInserted', function (event) { |
This event (DOMNodeInserted) which of the Mutation Events is used to detect changes in the DOM tree but most browsers are of the motion that it slows down performance hence the use of it is discourage. Chrome for instance has stated that it would be disabling these event feature in June. It was suggested that |
Seems like this is a duplicate of #115 and was already fixed. For Google Chrome the removal of those mutation events is announced for July 2024, so the end is near ;-). Will we have a new release before? Thanks |
Resurfacing this because it has just hit me on my projects and the datepicker works on none of them now that the DOMNodeInserted event is deprecated; I'm currently looking for a workaround to hold things temporarily. The fix is already in place, we just need a new version of this package to be published. |
Update for anyone needing a temporary fix: I was able to add the following to my BOOTSTRAP_DATEPICKER_PLUS = {
...,
"app_static_url": f"http{'s' if not DEBUG else ''}://{DOMAIN}{':8000' if DEBUG else ''}/static/bootstrap_datepicker_plus/",
} You can slim this down, but I wanted to account for debug and production modes.
|
Listener added for a synchronous 'DOMNodeInserted' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from browsers. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
The text was updated successfully, but these errors were encountered: