Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-79031

Add a JavaScript event for filters to trigger when they have finished rendering


      For issues like MDL-78662, it would be useful to reliably know in JavaScript when something (e.g. maths filter) has finished doing things that change the layout of the page.

      In the case of MathJax, there are specific MathJax things you can use to get notified when it has finished rendering and equation, but other bits of Moodle should not really use that. Instead, we should have a generic event (suggested name core_filters/contentRenderingDone), then filter_mathjaxloader can deal with MathJax, and then fire the Moodle event.

      This is similar to, but the opposite of, the existing event core_filters/contentUpdated, wihc other code uses when it has added some new content to the page, which filters like filter_mathjaxloader or filter_glossary might need to process.

      In the MathJax example, I am thinking we would fire this event once for each equation rendered, an trigger it on that HTML element.

            vuvanhieu143 Hieu Vu
            timhunt Tim Hunt
            Tim Hunt Tim Hunt
            Andrew Lyons Andrew Lyons
            CiBoT CiBoT
            0 Vote for this issue
            3 Start watching this issue


                Original Estimate - Not Specified
                Not Specified
                Remaining Estimate - 0 minutes
                Time Spent - 35 minutes

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.