Unfortuantly, I tried your update, it still to be fixed,
Final code used:
add_filter('wplms_load_dynamic_scripts',function($scripts){
$scripts[] = array('id'=>'ques','src'=>WPLMS_PLUGIN_URL.'/assets/js/question.js?tanjirokamado');
return $scripts;
});
add_action('wp_footer',function(){
?>
<script>
document.addEventListener('unit_loaded', (e)=>{
setTimeout(()=>{
var DOMContentLoaded_event = document.createEvent("Event");
DOMContentLoaded_event.initEvent("DOMContentLoaded", true, true);
window.document.dispatchEvent(DOMContentLoaded_event);
},500);
});
</script>
<?php
});
I really apperciate your effoport Alex.