mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
acd9d9823b
The legacy M.core.event.FORM_SUBMIT_AJAX ecent has been replaced with a new core_form/events::formSubmittedByJavascript native DOM event. The new event can be listened to at any point in the DOM using the following syntax: ``` import {eventTypes} from 'core_form/events'; document.addEventListener(eventTypes.formSubmittedByJavascript, handler); ``` A backward-compatabibility layer is included to ensure that any legacy YUI event triggered on a form is still respected and the new native event is also fired. A similar handler is also included to ensure that any legacy YUI event listener is still called with the same arguments. These legacy bridges will be removed after Moodle 4.3.