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

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

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 35 minutes
                  35m

                  Clockify

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