Skip to content
  • Andrew Lyons's avatar
    acd9d982
    MDL-70990 core_form: Replace FORM_SUBMIT_AJAX event · acd9d982
    Andrew Lyons authored
    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.
    acd9d982
    MDL-70990 core_form: Replace FORM_SUBMIT_AJAX event
    Andrew Lyons authored
    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.
Loading