Rather than requiring changes to Django, I believe you can do this with a MutationObserver to detect the class attribute changing on the corresponding elements: https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/observe . This has the advantage that we don't need to add custom events for every single change that Django's JavaScript makes.
On Fri, 4 Dec 2020 at 14:57, Fab <fabianjarr...@gmail.com> wrote: > When the admin's collapse script has finished it would be good to get an > event I can listen to: > > https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/collapse.js > > This would be useful for custom scripts that rely on the collapse class > and elements being in place. It would be better than having to wait a few > frames after the 'load' event to ensure the script has run already. > > Cheers, > > Fab > > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to Django itself)" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/170840dc-dfdd-40c7-bb69-a3e3f702d6f2n%40googlegroups.com > <https://groups.google.com/d/msgid/django-developers/170840dc-dfdd-40c7-bb69-a3e3f702d6f2n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Adam -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM2jyyCQ908SMXwBPDzDqk8XH%2B10ZUQuBV2ukNo7Mu5PFg%40mail.gmail.com.