Issue #3334704: Fix Ajax commands getting stuck when adding JavaScript with nomodule attribute
Closes #3334704
Ajax commands get stuck when adding JavaScript with nomodule
attribute. This is due to onload not getting triggered on script element when the script is not actually getting loaded, as it shouldn't on modern browsers supporting JavaScript modules. The solution implemented here is to use module!
and nomodule!
path modifiers with loadjs to delegate handling of those cases to loadjs. So, instead of assigning the attributes in the "before" callback/hook, these changes use the loadjs path modifiers for cases when loading module or nomodule JavaScript assets.